Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Unified Diff: runtime/bin/process_linux.cc

Issue 2618723002: Workaround attempt for timeout flakiness: Avoid running atexit() handlers in fork()ed process on li… (Closed)
Patch Set: add comment Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/process_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « runtime/bin/process_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698