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

Commit 121400a4 authored by Elliott Hughes's avatar Elliott Hughes Committed by Gerrit Code Review
Browse files

Merge "Make init distinguish between orderly exit and being killed by signals."

parents e456d420 6c5ad5c2
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -57,7 +57,15 @@ static int wait_for_one_process(int block)

    svc = service_find_by_pid(pid);
    if (!svc) {
        ERROR("untracked pid %d exited\n", pid);
        if (WIFEXITED(status)) {
            ERROR("untracked pid %d exited with status %d\n", pid, WEXITSTATUS(status));
        } else if (WIFSIGNALED(status)) {
            ERROR("untracked pid %d killed by signal %d\n", pid, WTERMSIG(status));
        } else if (WIFSTOPPED(status)) {
            ERROR("untracked pid %d stopped by signal %d\n", pid, WSTOPSIG(status));
        } else {
            ERROR("untracked pid %d state changed\n", pid);
        }
        return 0;
    }