Make init distinguish between orderly exit and being killed by signals.
Bug: 11826724 Change-Id: I7c11f602447dbd6862decc51cdfe883003cf7d67
This commit is contained in:
parent
71f2f2514e
commit
6c5ad5c2ce
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue