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

Unified Diff: session_manager_service.cc

Issue 661224: Stop infinite restarting (Closed)
Patch Set: Created 10 years, 10 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
Index: session_manager_service.cc
diff --git a/session_manager_service.cc b/session_manager_service.cc
index f11ce4da1fb9eb913a64c7a432c141e8c4ff026a..341ef1c65c03b4ca30a182c4c3aeb569cbaed8bb 100644
--- a/session_manager_service.cc
+++ b/session_manager_service.cc
@@ -198,6 +198,7 @@ bool SessionManagerService::Run() {
}
int SessionManagerService::RunChild() {
+ child_job_->RecordTime();
int pid = fork();
if (pid == 0) {
// In the child.
@@ -316,7 +317,7 @@ void SessionManagerService::HandleChildExit(GPid pid,
// If the child _ever_ exits uncleanly, we want to start it up again.
SessionManagerService* manager = static_cast<SessionManagerService*>(data);
- if (exited_clean) {
+ if (exited_clean || manager->should_stop_child()) {
ServiceShutdown(data);
} else if (manager->should_run_child()) {
// TODO(cmasone): deal with fork failing in RunChild()
« child_job.cc ('K') | « session_manager_service.h ('k') | session_manager_setup.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698