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

Unified Diff: content/app/content_main_runner.cc

Issue 19231006: chrome: respect --child-clean-exit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clarified comment. Created 7 years, 5 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 | content/browser/child_process_launcher.cc » ('j') | content/browser/child_process_launcher.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 5bbdb9b35d81c001374fa3b495ae5430bc16224a..460e6ed61770a33bdb182910643c00947afcf72a 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -5,6 +5,8 @@
#include "content/public/app/content_main_runner.h"
#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/wait.h>
#include "base/allocator/allocator_extension.h"
#include "base/at_exit.h"
@@ -786,6 +788,13 @@ class ContentMainRunnerImpl : public ContentMainRunner {
exit_manager_.reset(NULL);
+ // Wait for children to exit if --child-clean-exit is passed.
+ if (CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kChildCleanExit)) {
+ while (wait(NULL) != -1);
Markus (顧孟勤) 2013/07/22 22:50:13 Minor nit-pick (feel free to avoid). This looks v
asharif1 2013/07/22 23:43:54 I can easily make this change, but please comment
asharif1 2013/07/24 15:17:23 Done.
+ }
+
+
delegate_ = NULL;
is_shutdown_ = true;
}
« no previous file with comments | « no previous file | content/browser/child_process_launcher.cc » ('j') | content/browser/child_process_launcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698