Projects
Browse Source     Search     Timeline     Wiki

Changeset 23566

Show
Ignore:
Timestamp:
2008-03-21 15:57:06 (5 months ago)
Author:
zarzycki@…
Message:

A launchd.conf for the per-user launchd.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/SULeopard/launchd/src/launchctl.c

    r23515 r23566  
    314314{ 
    315315        char s[1000], *c, *av[100]; 
     316        const char *file; 
    316317        size_t len, i; 
    317318        FILE *f; 
    318319 
    319         if (!(f = fopen("/etc/launchd.conf", "r"))) { 
     320        if (getppid() == 1) { 
     321                file = "/etc/launchd.conf"; 
     322        } else { 
     323                file = "/etc/launchd-user.conf"; 
     324        } 
     325 
     326        if (!(f = fopen(file, "r"))) { 
    320327                return; 
    321328        } 
     
    16191626                } 
    16201627 
     1628                if (strcasecmp(session_type, VPROCMGR_SESSION_BACKGROUND) == 0) { 
     1629                        read_launchd_conf(); 
    16211630#if HAVE_SECURITY 
    1622                 if (strcasecmp(session_type, VPROCMGR_SESSION_BACKGROUND) == 0) { 
    16231631                        assumes(SessionCreate(sessionKeepCurrentBootstrap, 0) == 0); 
    1624                 } 
    16251632#endif 
     1633                } 
    16261634 
    16271635                return load_and_unload_cmd(the_argc, load_launchd_items);