Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96bcd488 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

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
parent f5d79aa4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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) {