diff options
author | Paul Crowley <paulcrowley@google.com> | 2018-04-13 17:38:57 +0000 |
---|---|---|
committer | Paul Crowley <paulcrowley@google.com> | 2018-04-17 09:03:57 -0700 |
commit | c73b21558be59369aceb9a62174343ff2837b9f5 (patch) | |
tree | d758a6fb43c18e4ee025afe0678e185eca7464f9 /init/sigchld_handler.cpp | |
parent | 07de83831f9a2bf67e1c4a4df72baed42b26c7e9 (diff) |
Re-land "If enablefilecrypto or init_user0 fails, reboot into recovery."
An earlier such change was reverted in commit e242a97db547dc73efea1b5287536be66637dc33.
Bug: 70487538
Test: ensure that angler can boot
Merged-In: Id5f57fce1c9b817a2650e0c848143d8a0d286bf0
Change-Id: Id5f57fce1c9b817a2650e0c848143d8a0d286bf0
Diffstat (limited to 'init/sigchld_handler.cpp')
-rw-r--r-- | init/sigchld_handler.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/init/sigchld_handler.cpp b/init/sigchld_handler.cpp index 3ec76df0b..0b0332429 100644 --- a/init/sigchld_handler.cpp +++ b/init/sigchld_handler.cpp @@ -81,16 +81,15 @@ static bool ReapOneProcess() { } } - auto status = siginfo.si_status; - if (WIFEXITED(status)) { - LOG(INFO) << name << " exited with status " << WEXITSTATUS(status) << wait_string; - } else if (WIFSIGNALED(status)) { - LOG(INFO) << name << " killed by signal " << WTERMSIG(status) << wait_string; + if (siginfo.si_code == CLD_EXITED) { + LOG(INFO) << name << " exited with status " << siginfo.si_status << wait_string; + } else { + LOG(INFO) << name << " received signal " << siginfo.si_status << wait_string; } if (!service) return true; - service->Reap(); + service->Reap(siginfo); if (service->flags() & SVC_TEMPORARY) { ServiceList::GetInstance().RemoveService(*service); |