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

Unified Diff: util/test/multiprocess_posix.cc

Issue 1000653002: test::Multiprocess: exit cleanly from children with _exit() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 9 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 | « util/test/multiprocess.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/test/multiprocess_posix.cc
diff --git a/util/test/multiprocess_posix.cc b/util/test/multiprocess_posix.cc
index f50446b17c6728a7dd6235fe5c88fbbc34eb7019..fbb39dfd1c655e8175ee28c0dc257de4e8ec924f 100644
--- a/util/test/multiprocess_posix.cc
+++ b/util/test/multiprocess_posix.cc
@@ -212,7 +212,8 @@ void Multiprocess::RunChild() {
return;
}
- exit(0);
+ // In a forked child, exit() is unsafe. Use _exit() instead.
+ _exit(EXIT_SUCCESS);
}
} // namespace test
« no previous file with comments | « util/test/multiprocess.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698