Modified: trunk/launchd/src/launchd_core_logic.c (23320 => 23321)
--- trunk/launchd/src/launchd_core_logic.c 2007-07-27 22:25:55 UTC (rev 23320)
+++ trunk/launchd/src/launchd_core_logic.c 2007-07-30 15:15:12 UTC (rev 23321)
@@ -1730,6 +1730,10 @@
job_t ji;
LIST_FOREACH(ji, &label_hash[hash_label(label)], label_hash_sle) {
+ if (ji->removal_pending) {
+ continue; /* 5351245 */
+ }
+
if (strcmp(ji->label, label) == 0) {
return ji;
}
@@ -5647,6 +5651,12 @@
j->mgr->parentmgr = background_jobmgr;
SLIST_INSERT_HEAD(&j->mgr->parentmgr->submgrs, j->mgr, sle);
+ /*
+ * We really should wait for all the jobs to die before proceeding. See 5351245 for more info.
+ *
+ * We have hacked around this in job_find() by ignoring jobs that are pending removal.
+ */
+
} else if (strcmp(j->mgr->name, VPROCMGR_SESSION_AQUA) == 0) {
return 0;
} else {