Revision
22954
Author
zarzycki@apple.com
Date
2006-11-16 13:33:30 -0800 (Thu, 16 Nov 2006)

Log Message

Defer socket creation until requested.

Modified Paths

Diff

Modified: trunk/launchd/src/launchd.c (22953 => 22954)


--- trunk/launchd/src/launchd.c	2006-11-16 19:17:39 UTC (rev 22953)
+++ trunk/launchd/src/launchd.c	2006-11-16 21:33:30 UTC (rev 22954)
@@ -485,8 +485,6 @@
 			pending_stderr = NULL;
 		}
 	}
-
-	ipc_server_init(NULL, 0);
 }
 
 void

Modified: trunk/launchd/src/launchd_core_logic.c (22953 => 22954)


--- trunk/launchd/src/launchd_core_logic.c	2006-11-16 19:17:39 UTC (rev 22953)
+++ trunk/launchd/src/launchd_core_logic.c	2006-11-16 21:33:30 UTC (rev 22954)
@@ -3701,10 +3701,10 @@
 		return BOOTSTRAP_NO_MEMORY;
 	}
 
+	ipc_server_init(NULL, 0);
+
 	if (!sockpath) {
 		return BOOTSTRAP_NO_MEMORY;
-	} else if (getpid() == 1) {
-		return BOOTSTRAP_NOT_PRIVILEGED;
 	}
 
 	strncpy(spr, sockpath, sizeof(name_t));