[launchd-changes] [23566] branches/SULeopard/launchd/src/launchctl.c
source_changes at macosforge.org
source_changes at macosforge.org
Fri Mar 21 15:57:07 PDT 2008
Revision: 23566
http://trac.macosforge.org/projects/launchd/changeset/23566
Author: zarzycki at 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);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080321/d47d3b76/attachment.html
More information about the launchd-changes
mailing list