[launchd-changes] [23797] trunk/launchd/src/launchd_core_logic.c
source_changes at macosforge.org
source_changes at macosforge.org
Tue Feb 10 23:49:22 PST 2009
Revision: 23797
http://trac.macosforge.org/projects/launchd/changeset/23797
Author: dsorresso at apple.com
Date: 2009-02-10 23:49:22 -0800 (Tue, 10 Feb 2009)
Log Message:
-----------
<rdar://problem/6290057> Allow the plist to specify whether a process can be safely suspended
Modified Paths:
--------------
trunk/launchd/src/launchd_core_logic.c
Modified: trunk/launchd/src/launchd_core_logic.c
===================================================================
--- trunk/launchd/src/launchd_core_logic.c 2009-02-11 05:51:19 UTC (rev 23796)
+++ trunk/launchd/src/launchd_core_logic.c 2009-02-11 07:49:22 UTC (rev 23797)
@@ -75,6 +75,7 @@
#include <ctype.h>
#include <glob.h>
#include <spawn.h>
+#include <libproc.h>
#if HAVE_SANDBOX
#define __APPLE_API_PRIVATE
#include <sandbox.h>
@@ -4051,6 +4052,12 @@
setenv(LAUNCHD_DO_APPLE_INTERNAL_LOGGING, "true", 1);
}
+#if !TARGET_OS_EMBEDDED
+ if( j->jetsam_priority != LAUNCHD_JETSAM_PRIORITY_UNSET ) {
+ job_assumes(j, proc_setpcontrol(PROC_SETPC_TERMINATE) == 0);
+ }
+#endif
+
/*
* We'd like to call setsid() unconditionally, but we have reason to
* believe that prevents launchd from being able to send signals to
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/launchd-changes/attachments/20090210/995cbbc4/attachment.html>
More information about the launchd-changes
mailing list