Projects
Browse Source     Search     Timeline     Wiki

Changeset 23397

Show
Ignore:
Timestamp:
09/17/07 14:58:35 (15 months ago)
Author:
zarzycki@…
Message:

The first per user launchd may be on behalf of a daemon and not a "real" user.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/launchd/src/launchd_core_logic.c

    r23396 r23397  
    453453static mach_port_t the_exception_server; 
    454454static bool did_first_per_user_launchd_BootCache_hack; 
     455#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)) 
    455456static jobmgr_t background_jobmgr; 
    456457static job_t workaround_5477111; 
     
    460461mach_port_t inherited_bootstrap_port; 
    461462jobmgr_t root_jobmgr; 
     463 
    462464 
    463465void 
     
    24512453                LIST_INSERT_HEAD(&j->mgr->active_jobs[ACTIVE_JOB_HASH(c)], j, pid_hash_sle); 
    24522454 
    2453                 if (j->per_user && !did_first_per_user_launchd_BootCache_hack) { 
     2455                if (JOB_BOOTCACHE_HACK_CHECK(j)) { 
    24542456                        did_first_per_user_launchd_BootCache_hack = true; 
    24552457                } 
     
    25132515        int i; 
    25142516 
    2515         if (j->per_user && !did_first_per_user_launchd_BootCache_hack) { 
     2517        if (JOB_BOOTCACHE_HACK_CHECK(j)) { 
    25162518                do_first_per_user_launchd_hack(); 
    25172519        }