[launchd-changes] [23321] trunk/launchd/src/launchd_core_logic.c

source_changes at macosforge.org source_changes at macosforge.org
Mon Jul 30 08:15:13 PDT 2007


Revision: 23321
          http://trac.macosforge.org/projects/launchd/changeset/23321
Author:   zarzycki at apple.com
Date:     2007-07-30 08:15:12 -0700 (Mon, 30 Jul 2007)

Log Message:
-----------
<rdar://problem/5351245> ARD Agent not starting when logging in as root

Modified Paths:
--------------
    trunk/launchd/src/launchd_core_logic.c

Modified: trunk/launchd/src/launchd_core_logic.c
===================================================================
--- 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 {

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20070730/adce1345/attachment.html


More information about the launchd-changes mailing list