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>
using namespace android;
int main(int /*argc*/, char** /*argv*/) {
+ signal(SIGPIPE, SIG_IGN);
SensorService::publishAndJoinThreadPool();
return 0;
}
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);