Revision
23247
Author
zarzycki@apple.com
Date
2007-05-08 12:23:04 -0700 (Tue, 08 May 2007)

Log Message

<rdar://problem/5174670> 9A422: Finder, Dock and SystemUIServer don't launch during login

Modified Paths

Diff

Modified: trunk/launchd/src/launchd_core_logic.c (23246 => 23247)


--- trunk/launchd/src/launchd_core_logic.c	2007-05-08 18:17:51 UTC (rev 23246)
+++ trunk/launchd/src/launchd_core_logic.c	2007-05-08 19:23:04 UTC (rev 23247)
@@ -1877,6 +1877,10 @@
 	jobmgr_t jmi, jmn;
 	job_t ji, jn;
 
+	if (jm->shutting_down) {
+		return;
+	}
+
 	SLIST_FOREACH_SAFE(jmi, &jm->submgrs, sle, jmn) {
 		jobmgr_dispatch_all(jmi, newmounthack);
 	}
@@ -3950,6 +3954,10 @@
 
 	job_assumes(j, launchd_mport_deallocate(ms->port) == KERN_SUCCESS);
 
+	if (ms->port == the_exception_server) {
+		the_exception_server = 0;
+	}
+
 	job_log(j, LOG_INFO, "Mach service deleted%s: %s", port_died ? " (port died)" : "", ms->name);
 
 	SLIST_REMOVE(&j->machservices, ms, machservice, sle);