diff options
| author | 2014-05-01 10:18:11 +0000 | |
|---|---|---|
| committer | 2014-05-01 10:18:11 +0000 | |
| commit | 703442238200c2f1a35b51e7aadc693322feb69d (patch) | |
| tree | 5bdd99d15873488d60351b097bb32fd0b8b68d37 | |
| parent | 6a6979ad17dfb492fb85a979e8f8688e4ed973b2 (diff) | |
| parent | fbb0ab02bed5c49159acb3dba6848a154e524169 (diff) | |
am fbb0ab02: Merge "Fix broken logging in Zygote.cpp."
* commit 'fbb0ab02bed5c49159acb3dba6848a154e524169':
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)); } } |