Projects
Browse Source     Search     Timeline     Wiki

Changeset 23564

Show
Ignore:
Timestamp:
03/21/08 15:53:56 (9 months ago)
Author:
zarzycki@…
Message:

A global launchd.conf for the per-user launchd.

Files:
1 modified

Legend:

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

    r23551 r23564  
    319319{ 
    320320        char s[1000], *c, *av[100]; 
     321        const char *file; 
    321322        size_t len, i; 
    322323        FILE *f; 
    323324 
    324         if (!(f = fopen("/etc/launchd.conf", "r"))) { 
     325        if (getppid() == 1) { 
     326                file = "/etc/launchd.conf"; 
     327        } else { 
     328                file = "/etc/launchd-user.conf"; 
     329        } 
     330 
     331        if (!(f = fopen(file, "r"))) { 
    325332                return; 
    326333        } 
     
    16261633                } 
    16271634 
     1635                if (strcasecmp(session_type, VPROCMGR_SESSION_BACKGROUND) == 0) { 
     1636                        read_launchd_conf(); 
    16281637#if HAVE_SECURITY 
    1629                 if (strcasecmp(session_type, VPROCMGR_SESSION_BACKGROUND) == 0) { 
    16301638                        assumes(SessionCreate(sessionKeepCurrentBootstrap, 0) == 0); 
    1631                 } 
    16321639#endif 
     1640                } 
    16331641 
    16341642                return load_and_unload_cmd(the_argc, load_launchd_items);