Modified: branches/SULeopard/launchd/src/launchctl.c (23565 => 23566)
--- branches/SULeopard/launchd/src/launchctl.c 2008-03-21 22:54:36 UTC (rev 23565)
+++ branches/SULeopard/launchd/src/launchctl.c 2008-03-21 22:57:06 UTC (rev 23566)
@@ -313,10 +313,17 @@
read_launchd_conf(void)
{
char s[1000], *c, *av[100];
+ const char *file;
size_t len, i;
FILE *f;
- if (!(f = fopen("/etc/launchd.conf", "r"))) {
+ if (getppid() == 1) {
+ file = "/etc/launchd.conf";
+ } else {
+ file = "/etc/launchd-user.conf";
+ }
+
+ if (!(f = fopen(file, "r"))) {
return;
}
@@ -1618,11 +1625,12 @@
the_argc += 1;
}
+ if (strcasecmp(session_type, VPROCMGR_SESSION_BACKGROUND) == 0) {
+ read_launchd_conf();
#if HAVE_SECURITY
- if (strcasecmp(session_type, VPROCMGR_SESSION_BACKGROUND) == 0) {
assumes(SessionCreate(sessionKeepCurrentBootstrap, 0) == 0);
+#endif
}
-#endif
return load_and_unload_cmd(the_argc, load_launchd_items);
}