[launchd-changes] [23397] trunk/launchd/src/launchd_core_logic.c
source_changes at macosforge.org
source_changes at macosforge.org
Mon Sep 17 14:58:35 PDT 2007
Revision: 23397
http://trac.macosforge.org/projects/launchd/changeset/23397
Author: zarzycki at apple.com
Date: 2007-09-17 14:58:35 -0700 (Mon, 17 Sep 2007)
Log Message:
-----------
The first per user launchd may be on behalf of a daemon and not a "real" user.
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-17 20:00:36 UTC (rev 23396)
+++ trunk/launchd/src/launchd_core_logic.c 2007-09-17 21:58:35 UTC (rev 23397)
@@ -452,6 +452,7 @@
static size_t total_children;
static mach_port_t the_exception_server;
static bool did_first_per_user_launchd_BootCache_hack;
+#define JOB_BOOTCACHE_HACK_CHECK(j) (j->per_user && !did_first_per_user_launchd_BootCache_hack && (j->mach_uid >= 500) && (j->mach_uid != (uid_t)-2))
static jobmgr_t background_jobmgr;
static job_t workaround_5477111;
static mach_timebase_info_data_t tbi;
@@ -460,6 +461,7 @@
mach_port_t inherited_bootstrap_port;
jobmgr_t root_jobmgr;
+
void
job_ignore(job_t j)
{
@@ -2450,7 +2452,7 @@
total_children++;
LIST_INSERT_HEAD(&j->mgr->active_jobs[ACTIVE_JOB_HASH(c)], j, pid_hash_sle);
- if (j->per_user && !did_first_per_user_launchd_BootCache_hack) {
+ if (JOB_BOOTCACHE_HACK_CHECK(j)) {
did_first_per_user_launchd_BootCache_hack = true;
}
@@ -2512,7 +2514,7 @@
size_t binpref_out_cnt = 0;
int i;
- if (j->per_user && !did_first_per_user_launchd_BootCache_hack) {
+ if (JOB_BOOTCACHE_HACK_CHECK(j)) {
do_first_per_user_launchd_hack();
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20070917/b0fdfab6/attachment.html
More information about the launchd-changes
mailing list