Revision
23527
Author
zarzycki@apple.com
Date
2008-03-04 09:48:00 -0800 (Tue, 04 Mar 2008)

Log Message

<rdar://problem/5759898> HopefullyExitsFirst jobs can't start OnDemand jobs

Modified Paths

Diff

Modified: branches/SULeopard/launchd/src/launchd_core_logic.c (23526 => 23527)


--- branches/SULeopard/launchd/src/launchd_core_logic.c	2008-03-04 00:46:00 UTC (rev 23526)
+++ branches/SULeopard/launchd/src/launchd_core_logic.c	2008-03-04 17:48:00 UTC (rev 23527)
@@ -3834,7 +3834,7 @@
 	} else if (j->removal_pending) {
 		job_log(j, LOG_DEBUG, "Exited while removal was pending.");
 		return true;
-	} else if (j->mgr->shutting_down) {
+	} else if (j->mgr->shutting_down && j->mgr->hopefully_first_cnt == 0) {
 		job_log(j, LOG_DEBUG, "Exited while shutdown in progress. Processes remaining: %lu/%lu", total_children, total_anon_children);
 		return true;
 	} else if (j->legacy_mach_job) {