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

Commit 55b5360a authored by David Anderson's avatar David Anderson Committed by Automerger Merge Worker
Browse files

Merge "first_stage_init: Add SIGCHLD handler in first_stage_console" am: ce8aa990

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1807489

Change-Id: Ie7a6e0d1c341e7cf67c12f8fdef693ce49f743af
parents e5eede15 ce8aa990
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -85,7 +85,10 @@ namespace init {

void StartConsole(const std::string& cmdline) {
    bool console = KernelConsolePresent(cmdline);
    // Use a simple sigchld handler -- first_stage_console doesn't need to track or log zombies
    const struct sigaction chld_act { .sa_handler = SIG_DFL, .sa_flags = SA_NOCLDWAIT };

    sigaction(SIGCHLD, &chld_act, nullptr);
    pid_t pid = fork();
    if (pid != 0) {
        int status;