debuggerd: Ignore SIGPIPE

The system server may prematurely close the connection to
/data/system/ndebugsocket if it's not interested in the data
from debuggerd.  If it does so, we don't want to die due to a
SIGPIPE.

Change-Id: Iaef1f497bcd630144e6df6a06644a3293b85b6e0
This commit is contained in:
Nick Kralevich 2013-06-18 17:57:08 -07:00
parent f5d79aa4bb
commit 96bcd488c2
1 changed files with 3 additions and 1 deletions

View File

@ -435,11 +435,13 @@ static int do_server() {
signal(SIGBUS, SIG_DFL);
signal(SIGFPE, SIG_DFL);
signal(SIGSEGV, SIG_DFL);
signal(SIGPIPE, SIG_DFL);
#ifdef SIGSTKFLT
signal(SIGSTKFLT, SIG_DFL);
#endif
// Ignore failed writes to closed sockets
signal(SIGPIPE, SIG_IGN);
logsocket = socket_local_client("logd",
ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_DGRAM);
if(logsocket < 0) {