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

Unified Diff: runtime/bin/process_android.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 | « no previous file | runtime/bin/process_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process_android.cc
diff --git a/runtime/bin/process_android.cc b/runtime/bin/process_android.cc
index 550f680a0861d9894b2557149f7d139ed65119fe..11949ba8a2d0b2adf505d0f9e58269f6be1b874d 100644
--- a/runtime/bin/process_android.cc
+++ b/runtime/bin/process_android.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 | « no previous file | runtime/bin/process_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698