commit | 0944691d68089c17d71641a55192fb2fe755ec92 | [log] [tgz] |
---|---|---|
author | Young-Ho Cha <ganadist@gmail.com> | Fri Aug 28 19:55:18 2015 +0900 |
committer | Elliott Hughes <enh@google.com> | Fri Aug 28 20:29:00 2015 -0700 |
tree | c6f3452b2f745994e4e49f9021260a2f64485c14 | |
parent | 2acadb3f26b3f9b7f2ae7c1bca219ada94066462 [diff] [blame] |
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);