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

source_changes at macosforge.org source_changes at macosforge.org
Tue Jul 3 10:31:03 PDT 2007


Revision: 23292
          http://trac.macosforge.org/projects/launchd/changeset/23292
Author:   zarzycki at apple.com
Date:     2007-07-03 10:31:02 -0700 (Tue, 03 Jul 2007)

Log Message:
-----------
<rdar://problem/5299540> Aqua session launch agent jobs not loaded for root user session

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-02 21:31:19 UTC (rev 23291)
+++ trunk/launchd/src/launchd_core_logic.c	2007-07-03 17:31:02 UTC (rev 23292)
@@ -5422,7 +5422,7 @@
 void
 job_reparent_hack(job_t j, const char *where)
 {
-	jobmgr_t jmi = NULL;
+	jobmgr_t jmi, jmi2;
 
 	ensure_root_bkgd_setup();
 
@@ -5445,10 +5445,18 @@
 
 	SLIST_FOREACH(jmi, &root_jobmgr->submgrs, sle) {
 		if (strcasecmp(jmi->name, where) == 0) {
-			break;
+			goto jm_found;
+		} else if (strcasecmp(jmi->name, VPROCMGR_SESSION_BACKGROUND) == 0 && getpid() == 1) {
+			SLIST_FOREACH(jmi2, &jmi->submgrs, sle) {
+				if (strcasecmp(jmi2->name, where) == 0) {
+					jmi = jmi2;
+					goto jm_found;
+				}
+			}
 		}
 	}
 
+jm_found:
 	if (job_assumes(j, jmi != NULL)) {
 		struct machservice *msi;
 

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


More information about the launchd-changes mailing list