Projects
Browse Source     Search     Timeline     Wiki

Changeset 23368

Show
Ignore:
Timestamp:
09/10/07 13:43:52 (15 months ago)
Author:
zarzycki@…
Message:

We only need/want the "Still alive" check if launchd has been idle for a while...

Files:
1 modified

Legend:

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

    r23366 r23368  
    640640} 
    641641 
     642static void 
     643still_alive_with_check(void) 
     644{ 
     645        jobmgr_log(root_jobmgr, LOG_NOTICE, "Still alive with %u children.", total_children); 
     646 
     647        runtime_closelog(); /* hack to flush logs */ 
     648} 
     649 
    642650jobmgr_t 
    643651jobmgr_shutdown(jobmgr_t jm) 
     
    663671 
    664672        if (debug_shutdown_hangs && jm->parentmgr == NULL && getpid() == 1) { 
    665                 jobmgr_assumes(jm, kevent_mod((uintptr_t)jm, EVFILT_TIMER, EV_ADD, NOTE_SECONDS, 3, jm) != -1); 
     673                runtime_set_timeout(still_alive_with_check, 3000); 
    666674        } 
    667675 
     
    22422250                break; 
    22432251        case EVFILT_TIMER: 
    2244                 if (kev->ident == (uintptr_t)&sorted_calendar_events) { 
     2252                if (jobmgr_assumes(jm, kev->ident == (uintptr_t)&sorted_calendar_events)) { 
    22452253                        calendarinterval_callback(); 
    2246                 } else { 
    2247                         jobmgr_log(jm, LOG_NOTICE, "Still alive with %u children.", total_children); 
    2248                         runtime_closelog(); /* hack to flush logs */ 
    22492254                } 
    22502255                break;