am 8bda6ce5: am 121400a4: Merge "Make init distinguish between orderly exit and being killed by signals."

* commit '8bda6ce55700e46760f8d59820406b72964fa171':
  Make init distinguish between orderly exit and being killed by signals.
This commit is contained in:
Elliott Hughes 2013-11-27 17:09:20 +00:00 committed by Android Git Automerger
commit 7b1791e153
1 changed files with 9 additions and 1 deletions

View File

@ -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;
}