Revision: 23566 http://trac.macosforge.org/projects/launchd/changeset/23566 Author: zarzycki@apple.com Date: 2008-03-21 15:57:06 -0700 (Fri, 21 Mar 2008) Log Message: ----------- A launchd.conf for the per-user launchd. Modified Paths: -------------- branches/SULeopard/launchd/src/launchctl.c Modified: branches/SULeopard/launchd/src/launchctl.c =================================================================== --- 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); }
participants (1)
-
source_changes@macosforge.org