[launchd-changes] [23421] trunk/launchd/src/launchd_core_logic.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu Sep 20 16:05:54 PDT 2007
Revision: 23421
http://trac.macosforge.org/projects/launchd/changeset/23421
Author: zarzycki at apple.com
Date: 2007-09-20 16:05:54 -0700 (Thu, 20 Sep 2007)
Log Message:
-----------
<rdar://problem/5495431> cannot drop to text console
Modified Paths:
--------------
trunk/launchd/src/launchd_core_logic.c
Modified: trunk/launchd/src/launchd_core_logic.c
===================================================================
--- trunk/launchd/src/launchd_core_logic.c 2007-09-20 20:26:16 UTC (rev 23420)
+++ trunk/launchd/src/launchd_core_logic.c 2007-09-20 23:05:54 UTC (rev 23421)
@@ -2942,10 +2942,15 @@
setenv(ei->key, ei->value, 1);
}
- if (j->per_user) {
+ /*
+ * We'd like to call setsid() unconditionally, but we have reason to
+ * believe that prevents launchd from being able to send signals to
+ * setuid children. We'll settle for process-groups.
+ */
+ if (getuid()) {
+ job_assumes(j, setpgid(0, 0) != -1);
+ } else {
job_assumes(j, setsid() != -1);
- } else {
- job_assumes(j, setpgid(0, 0) != -1);
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20070920/77d31b09/attachment.html
More information about the launchd-changes
mailing list