ignore SIGPIPE signal in native services

When run dump method via dumpsys command with invalid pipe fd, native
services can crash with SIGPIPE.
So ignore SIGPIPE signal.

Bug: https://code.google.com/p/android/issues/detail?id=184099
Change-Id: Icb15e0dff34a245c08c1b4c4bed51992ae382da4
Signed-off-by: Young-Ho Cha <ganadist@gmail.com>
diff --git a/services/surfaceflinger/main_surfaceflinger.cpp b/services/surfaceflinger/main_surfaceflinger.cpp
index a74bc4c..ca81aaa 100644
--- a/services/surfaceflinger/main_surfaceflinger.cpp
+++ b/services/surfaceflinger/main_surfaceflinger.cpp
@@ -26,6 +26,7 @@
 using namespace android;
 
 int main(int, char**) {
+    signal(SIGPIPE, SIG_IGN);
     // When SF is launched in its own process, limit the number of
     // binder threads to 4.
     ProcessState::self()->setThreadPoolMaxThreadCount(4);