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

Unified Diff: content/child/child_thread.cc

Issue 20842002: child processes: wait 60 seconds before sending SIGALRM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switched period and paren. 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread.cc
diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc
index 05650ade06f688cd69040d437d44b6c508cdb013..d250293c7023d535a481c140a846819f61cf8ddb 100644
--- a/content/child/child_thread.cc
+++ b/content/child/child_thread.cc
@@ -70,14 +70,16 @@ class SuicideOnChannelErrorFilter : public IPC::ChannelProxy::MessageFilter {
//
// So, we install a filter on the channel so that we can process this event
// here and kill the process.
- //
- // We want to kill this process after giving it 30 seconds to run the exit
- // handlers. SIGALRM has a default disposition of terminating the
- // application.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kChildCleanExit))
- alarm(30);
- else
+ if (CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kChildCleanExit)) {
+ // If clean exit is requested, we want to kill this process after giving
+ // it 60 seconds to run exit handlers. Exit handlers may including ones
+ // that write profile data to disk (which happens under profile collection
+ // mode).
+ alarm(60);
+ } else {
_exit(0);
+ }
}
protected:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698