Projects
Browse Source     Search     Timeline     Wiki

Changeset 23303

Show
Ignore:
Timestamp:
07/11/07 11:10:33 (17 months ago)
Author:
zarzycki@…
Message:

Misc fixes.

Files:
1 modified

Legend:

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

    r23301 r23303  
    168168static void socketgroup_callback(job_t j); 
    169169static void socketgroup_setup(launch_data_t obj, const char *key, void *context); 
     170static void socketgroup_kevent_mod(job_t j, struct socketgroup *sg, bool do_add); 
    170171 
    171172struct calendarinterval { 
     
    181182static bool calendarinterval_new(job_t j, struct tm *w); 
    182183static bool calendarinterval_new_from_obj(job_t j, launch_data_t obj); 
     184static void calendarinterval_new_from_obj_dict_walk(launch_data_t obj, const char *key, void *context); 
    183185static void calendarinterval_delete(job_t j, struct calendarinterval *ci); 
    184186static void calendarinterval_setalarm(job_t j, struct calendarinterval *ci); 
     
    403405static void job_log_error(job_t j, int pri, const char *msg, ...) __attribute__((format(printf, 3, 4))); 
    404406static void job_log_bug(job_t j, const char *rcs_rev, const char *path, unsigned int line, const char *test); 
     407static void job_log_stdouterr2(job_t j, const char *msg, ...); 
    405408static void job_set_exeception_port(job_t j, mach_port_t port); 
    406409static kern_return_t job_handle_mpm_wait(job_t j, mach_port_t srp, int *waitstatus); 
     
    430433static bool cronemu_min(struct tm *wtm, int min); 
    431434 
    432 static unsigned int total_children; 
     435/* miscellaneous file local functions */ 
    433436static void ensure_root_bkgd_setup(void); 
    434437static int dir_has_files(job_t j, const char *path); 
    435438static char **mach_cmd2argv(const char *string); 
    436439static size_t our_strhash(const char *s) __attribute__((pure)); 
     440static void extract_rcsid_substr(const char *i, char *o, size_t osz); 
     441static void do_first_per_user_launchd_hack(void); 
     442 
     443/* file local globals */ 
     444static unsigned int total_children; 
    437445static mach_port_t the_exception_server; 
    438446static bool did_first_per_user_launchd_BootCache_hack; 
    439  
     447static jobmgr_t background_jobmgr; 
     448 
     449/* process wide globals */ 
    440450jobmgr_t root_jobmgr; 
    441 static jobmgr_t background_jobmgr; 
    442451 
    443452void 
     
    20032012} 
    20042013 
    2005 static void 
     2014void 
    20062015job_log_stdouterr2(job_t j, const char *msg, ...) 
    20072016{ 
     
    23532362} 
    23542363 
    2355 static void 
     2364void 
    23562365do_first_per_user_launchd_hack(void) 
    23572366{ 
     
    28132822} 
    28142823 
    2815 static void 
     2824void 
    28162825extract_rcsid_substr(const char *i, char *o, size_t osz) 
    28172826{ 
     
    29943003        int fflags = 0; 
    29953004         
     3005        strlcpy(parentdir_path, dirname(si->what), sizeof(parentdir_path)); 
     3006 
    29963007        switch (si->why) { 
    29973008        case PATH_EXISTS: 
    29983009                fflags = NOTE_DELETE|NOTE_RENAME|NOTE_REVOKE|NOTE_EXTEND|NOTE_WRITE; 
    2999                 strlcpy(parentdir_path, dirname(si->what), sizeof(parentdir_path)); 
    3000                 which_path = parentdir_path; 
    30013010                break; 
    30023011        case PATH_MISSING: 
     
    30123021 
    30133022        if (si->fd == -1) { 
    3014                 si->fd = _fd(open(which_path, O_EVTONLY|O_NOCTTY)); 
     3023                if ((si->fd = _fd(open(which_path, O_EVTONLY|O_NOCTTY))) == -1) { 
     3024                        which_path = parentdir_path; 
     3025                        si->fd = _fd(open(which_path, O_EVTONLY|O_NOCTTY)); 
     3026                } 
    30153027        } 
    30163028 
     
    30873099} 
    30883100 
    3089 static void 
     3101void 
    30903102calendarinterval_new_from_obj_dict_walk(launch_data_t obj, const char *key, void *context) 
    30913103{ 
     
    32463258} 
    32473259 
    3248 static void 
     3260void 
    32493261socketgroup_kevent_mod(job_t j, struct socketgroup *sg, bool do_add) 
    32503262{