summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-11-27 17:09:20 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2013-11-27 17:09:20 +0000
commit7b1791e153bb836f72ee122691f80f2012c9fe75 (patch)
tree321d27c1bc96de007638677c28a06077629db7b3
parent7d2db03ef7eb12fdf33562c37d47f803b32c12f1 (diff)
parent8bda6ce55700e46760f8d59820406b72964fa171 (diff)
downloadsystem_core-7b1791e153bb836f72ee122691f80f2012c9fe75.zip
system_core-7b1791e153bb836f72ee122691f80f2012c9fe75.tar.gz
system_core-7b1791e153bb836f72ee122691f80f2012c9fe75.tar.bz2
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.
-rw-r--r--init/signal_handler.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/init/signal_handler.c b/init/signal_handler.c
index d31ad63..7e8e1a7 100644
--- a/init/signal_handler.c
+++ b/init/signal_handler.c
@@ -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;
}