Projects
Browse Source     Search     Timeline     Wiki

Changeset 23054

Show
Ignore:
Timestamp:
02/09/07 19:25:34 (22 months ago)
Author:
zarzycki@…
Message:

Misc

Files:
1 modified

Legend:

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

    r23053 r23054  
    202202        char *jm_stderr; 
    203203        unsigned int global_on_demand_cnt; 
    204         unsigned int would_have_sigkilled; 
    205204        unsigned int transfer_bstrap:1, sent_stop_to_hopeful_jobs:1, shutting_down:1; 
    206205        char name[0]; 
     
    17721771job_kill(job_t j) 
    17731772{ 
    1774         if (debug_shutdown_hangs) { 
    1775                 j->mgr->would_have_sigkilled++; 
    1776                 if (j->mgr->would_have_sigkilled >= total_children) { 
    1777                         job_assumes(j, host_reboot(mach_host_self(), HOST_REBOOT_DEBUGGER) == 0); 
    1778                 } 
    1779         } else { 
    1780                 job_assumes(j, kill(j->p, SIGKILL) != -1); 
    1781         } 
     1773        job_assumes(j, kill(j->p, SIGKILL) != -1); 
    17821774} 
    17831775 
     
    17891781        switch (kev->filter) { 
    17901782        case EVFILT_PROC: 
    1791                 job_reap(j); 
    1792                 job_dispatch(j, false); 
     1783                if (kev->fflags & NOTE_EXEC) { 
     1784                        job_log(j, LOG_DEBUG, "Called execve()"); 
     1785                } 
     1786                if (kev->fflags & NOTE_EXIT) { 
     1787                        job_reap(j); 
     1788                        job_dispatch(j, false); 
     1789                } 
    17931790                break; 
    17941791        case EVFILT_TIMER: 
     
    19261923                        ipc_open(_fd(spair[0]), j); 
    19271924                } 
    1928                 if (kevent_mod(c, EVFILT_PROC, EV_ADD, NOTE_EXIT, 0, &j->kqjob_callback) == -1) { 
     1925                if (kevent_mod(c, EVFILT_PROC, EV_ADD, NOTE_EXEC|NOTE_EXIT, 0, &j->kqjob_callback) == -1) { 
    19291926                        job_log_error(j, LOG_ERR, "kevent()"); 
    19301927                        job_reap(j); 
     
    35023499machservice_delete(struct machservice *ms) 
    35033500{ 
    3504         if (ms->recv) { 
    3505                 if (ms->isActive) { 
    3506                         /* FIXME we should cancel the notification */ 
    3507                         job_log(ms->job, LOG_DEBUG, "Mach service deleted while we didn't own the receive right: %s", ms->name); 
    3508                 } else { 
    3509                         job_assumes(ms->job, launchd_mport_close_recv(ms->port) == KERN_SUCCESS); 
    3510                 } 
     3501        if (ms->recv && job_assumes(ms->job, !ms->isActive)) { 
     3502                job_assumes(ms->job, launchd_mport_close_recv(ms->port) == KERN_SUCCESS); 
    35113503        } 
    35123504