Skip to content

Commit

Permalink
debuggerd: Ignore SIGPIPE
Browse files Browse the repository at this point in the history
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: Iec99ed1fe6254669b3b7554b4247353cd73b5e67
  • Loading branch information
nickkral authored and hyperb1iss committed Nov 8, 2013
1 parent ee74802 commit e2740bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion debuggerd/debuggerd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e2740bf

Please sign in to comment.