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

Commit b3433384 authored by Elliott Hughes's avatar Elliott Hughes Committed by android-build-merger
Browse files

Merge "adbd's children should have SIGPIPE set to SIG_DFL." am: 81c6ff3b

am: 10ecd9de

Change-Id: I204df35416733257c8ff2b2eb6f1ba22a17098bb
parents 1373a6c7 10ecd9de
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -320,6 +320,10 @@ bool Subprocess::ForkAndExec(std::string* error) {
        parent_error_sfd.reset(-1);
        close_on_exec(child_error_sfd);

        // adbd sets SIGPIPE to SIG_IGN to get EPIPE instead, and Linux propagates that to child
        // processes, so we need to manually reset back to SIG_DFL here (http://b/35209888).
        signal(SIGPIPE, SIG_DFL);

        if (command_.empty()) {
            execle(_PATH_BSHELL, _PATH_BSHELL, "-", nullptr, cenv.data());
        } else {