| Index: runtime/bin/process_linux.cc
|
| diff --git a/runtime/bin/process_linux.cc b/runtime/bin/process_linux.cc
|
| index c8a2f7b51abebbce9ad52c4226cae997575583d4..41978693acc33036a8e1899db3d8d578cc1ab1af 100644
|
| --- a/runtime/bin/process_linux.cc
|
| +++ b/runtime/bin/process_linux.cc
|
| @@ -163,9 +163,12 @@ class ExitCodeHandler {
|
| // monitor.
|
| running_ = false;
|
|
|
| - // Fork to wake up waitpid.
|
| + // Wake up the [ExitCodeHandler] thread which is blocked on `wait()` (see
|
| + // [ExitCodeHandlerEntry]).
|
| if (TEMP_FAILURE_RETRY(fork()) == 0) {
|
| - exit(0);
|
| + // We avoid running through registered atexit() handlers because that is
|
| + // unnecessary work.
|
| + _exit(0);
|
| }
|
|
|
| monitor_->Notify();
|
|
|