[launchd-changes] [23213] trunk/launchd/src/launchctl.c
source_changes at macosforge.org
source_changes at macosforge.org
Wed Apr 11 09:29:38 PDT 2007
Revision: 23213
http://trac.macosforge.org/projects/launchd/changeset/23213
Author: zarzycki at apple.com
Date: 2007-04-11 09:29:37 -0700 (Wed, 11 Apr 2007)
Log Message:
-----------
<rdar://problem/5036004> 9A380: launchd.conf limit core unlimited not honored
Modified Paths:
--------------
trunk/launchd/src/launchctl.c
Modified: trunk/launchd/src/launchctl.c
===================================================================
--- trunk/launchd/src/launchctl.c 2007-04-11 15:33:07 UTC (rev 23212)
+++ trunk/launchd/src/launchctl.c 2007-04-11 16:29:37 UTC (rev 23213)
@@ -140,6 +140,7 @@
static void do_bootroot_magic(void);
static void do_single_user_mode(bool);
static bool do_single_user_mode2(void);
+static void read_launchd_conf(void);
typedef enum {
BOOTCACHE_START = 1,
@@ -287,6 +288,39 @@
return 1;
}
+void
+read_launchd_conf(void)
+{
+ FILE *f = fopen("/etc/launchd.conf", "r");
+ char s[1000], *c, *av[100];
+ size_t len, i;
+
+ if (!(f = fopen("/etc/launchd.conf", "r"))) {
+ return;
+ }
+
+ while ((c = fgets(s, sizeof(s), f))) {
+ len = strlen(c);
+ if (len && c[len - 1] == '\n') {
+ c[len - 1] = '\0';
+ }
+
+ i = 0;
+
+ while ((av[i] = strsep(&c, " \t"))) {
+ if (*(av[i]) != '\0') {
+ i++;
+ }
+ }
+
+ if (i > 0) {
+ demux_cmd(i, av);
+ }
+ }
+
+ fclose(f);
+}
+
int
unsetenv_cmd(int argc, char *const argv[])
{
@@ -1332,6 +1366,8 @@
do_potential_fsck();
}
+ read_launchd_conf();
+
if (path_check("/var/account/acct")) {
assumes(acct("/var/account/acct") != -1);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20070411/2e0a309b/attachment.html
More information about the launchd-changes
mailing list