Merge "Fix broken logging in Zygote.cpp."
This commit is contained in:
@@ -92,14 +92,10 @@ static void SigChldHandler(int /*signal_number*/) {
|
|||||||
if (WIFEXITED(status)) {
|
if (WIFEXITED(status)) {
|
||||||
if (WEXITSTATUS(status)) {
|
if (WEXITSTATUS(status)) {
|
||||||
ALOGI("Process %d exited cleanly (%d)", pid, 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)) {
|
} else if (WIFSIGNALED(status)) {
|
||||||
if (WTERMSIG(status) != SIGKILL) {
|
if (WTERMSIG(status) != SIGKILL) {
|
||||||
ALOGI("Process %d exited cleanly (%d)", pid, WTERMSIG(status));
|
ALOGI("Process %d exited due to signal (%d)", pid, WTERMSIG(status));
|
||||||
} else if (false) {
|
|
||||||
ALOGI("Process %d exited cleanly (%d)", pid, WTERMSIG(status));
|
|
||||||
}
|
}
|
||||||
#ifdef WCOREDUMP
|
#ifdef WCOREDUMP
|
||||||
if (WCOREDUMP(status)) {
|
if (WCOREDUMP(status)) {
|
||||||
@@ -117,8 +113,10 @@ static void SigChldHandler(int /*signal_number*/) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pid < 0) {
|
// Note that we shouldn't consider ECHILD an error because
|
||||||
ALOGW("Zygote SIGCHLD error in waitpid: %d", errno);
|
// 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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user