diff options
author | Narayan Kamath <narayan@google.com> | 2014-05-01 10:15:00 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-05-01 10:15:01 +0000 |
commit | fbb0ab02bed5c49159acb3dba6848a154e524169 (patch) | |
tree | ff60a4dbf0ccabce78409ba1dba1c147cfb2c692 | |
parent | 86315c452b955bf0b874f45c1a2e15aedda91a52 (diff) | |
parent | 160992da04cab56a92cd425adc249c52b040f93d (diff) | |
download | base-fbb0ab02bed5c49159acb3dba6848a154e524169.tar.gz |
Merge "Fix broken logging in Zygote.cpp."
-rw-r--r-- | core/jni/com_android_internal_os_Zygote.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index a61fa874beb6..c58bf04f1f4e 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp @@ -92,14 +92,10 @@ static void SigChldHandler(int /*signal_number*/) { if (WIFEXITED(status)) { if (WEXITSTATUS(status)) { ALOGI("Process %d exited cleanly (%d)", pid, WEXITSTATUS(status)); - } else if (false) { - ALOGI("Process %d exited cleanly (%d)", pid, WEXITSTATUS(status)); } } else if (WIFSIGNALED(status)) { if (WTERMSIG(status) != SIGKILL) { - ALOGI("Process %d exited cleanly (%d)", pid, WTERMSIG(status)); - } else if (false) { - ALOGI("Process %d exited cleanly (%d)", pid, WTERMSIG(status)); + ALOGI("Process %d exited due to signal (%d)", pid, WTERMSIG(status)); } #ifdef WCOREDUMP if (WCOREDUMP(status)) { @@ -117,8 +113,10 @@ static void SigChldHandler(int /*signal_number*/) { } } - if (pid < 0) { - ALOGW("Zygote SIGCHLD error in waitpid: %d", errno); + // Note that we shouldn't consider ECHILD an error because + // the secondary zygote might have no children left to wait for. + if (pid < 0 && errno != ECHILD) { + ALOGW("Zygote SIGCHLD error in waitpid: %s", strerror(errno)); } } |