[launchd-changes] [22872] trunk/launchd/src

source_changes at macosforge.org source_changes at macosforge.org
Sat Sep 23 13:00:17 PDT 2006


Revision: 22872
          http://trac.macosforge.org/projects/launchd/changeset/22872
Author:   zarzycki at apple.com
Date:     2006-09-23 13:00:16 -0700 (Sat, 23 Sep 2006)

Log Message:
-----------
Structural and semantic reorganization:

When possible, let's have the services created with bootstrap_register() associated with the job that created them rather than the bootstrap itself.

This, in theory, could break things if the job is removed and it didn't own the receive right that it registered in the namespace, but in practice, I have not seen any evidence for this boundary condition being used.

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

Modified: trunk/launchd/src/launchd_core_logic.c
===================================================================
--- trunk/launchd/src/launchd_core_logic.c	2006-09-23 17:43:34 UTC (rev 22871)
+++ trunk/launchd/src/launchd_core_logic.c	2006-09-23 20:00:16 UTC (rev 22872)
@@ -2843,7 +2843,7 @@
 
 	ms->isActive = true;
 
-	if (ms->job->req_port == MACH_PORT_NULL) {
+	if (ms->recv) {
 		which = MACH_NOTIFY_PORT_DESTROYED;
 		job_checkin(ms->job);
 	}

Modified: trunk/launchd/src/launchd_mach_ipc.c
===================================================================
--- trunk/launchd/src/launchd_mach_ipc.c	2006-09-23 17:43:34 UTC (rev 22871)
+++ trunk/launchd/src/launchd_mach_ipc.c	2006-09-23 20:00:16 UTC (rev 22872)
@@ -269,7 +269,7 @@
 	}
 
 	if (serviceport != MACH_PORT_NULL) {
-		if ((ms = machservice_new(job_get_bs(j), servicename, &serviceport))) {
+		if ((ms = machservice_new(j, servicename, &serviceport))) {
 			machservice_watch(ms);
 		} else {
 			return BOOTSTRAP_NO_MEMORY;

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


More information about the launchd-changes mailing list