Changeset 23276
- Timestamp:
- 06/08/07 14:11:59 (18 months ago)
- Files:
-
- 1 modified
-
trunk/launchd/src/launchd_core_logic.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/launchd/src/launchd_core_logic.c
r23275 r23276 2728 2728 calendarinterval_setalarm(job_t j, struct calendarinterval *ci) 2729 2729 { 2730 static time_t last_list_head_when;2731 2730 struct calendarinterval *ci_iter, *ci_prev = NULL; 2732 time_t later ;2731 time_t later, head_later; 2733 2732 2734 2733 later = cronemu(ci->when.tm_mon, ci->when.tm_mday, ci->when.tm_hour, ci->when.tm_min); … … 2765 2764 } 2766 2765 2767 if (last_list_head_when == LIST_FIRST(&sorted_calendar_events)->when_next) { 2768 return; 2769 } 2770 2771 last_list_head_when = LIST_FIRST(&sorted_calendar_events)->when_next; 2772 2773 if (job_assumes(j, kevent_mod((uintptr_t)&sorted_calendar_events, EVFILT_TIMER, EV_ADD, NOTE_ABSOLUTE|NOTE_SECONDS, last_list_head_when, root_jobmgr) != -1)) { 2766 head_later = LIST_FIRST(&sorted_calendar_events)->when_next; 2767 2768 /* Workaround 5225889 */ 2769 kevent_mod((uintptr_t)&sorted_calendar_events, EVFILT_TIMER, EV_DELETE, 0, 0, root_jobmgr); 2770 2771 if (job_assumes(j, kevent_mod((uintptr_t)&sorted_calendar_events, EVFILT_TIMER, EV_ADD, NOTE_ABSOLUTE|NOTE_SECONDS, head_later, root_jobmgr) != -1)) { 2774 2772 char time_string[100]; 2775 2773 size_t time_string_len; … … 3157 3155 time_t now = time(NULL); 3158 3156 3159 if (ci && ci->when_next < now) {3157 if (ci && (ci->when_next < now)) { 3160 3158 jobmgr_assumes(root_jobmgr, kill(getpid(), SIGUSR1) != -1); 3161 3159 } … … 3171 3169 job_t j = ci->job; 3172 3170 3173 if (ci->when_next > =now) {3171 if (ci->when_next > now) { 3174 3172 break; 3175 3173 } … … 3454 3452 } 3455 3453 3456 if (j->start_pending && j->start_time == 0) {3457 job_log(j, LOG_DEBUG, "KeepAlive check: job needs to run at least once.");3454 if (j->start_pending) { 3455 job_log(j, LOG_DEBUG, "KeepAlive check: Pent-up non-IPC launch criteria."); 3458 3456 return true; 3459 3457 }

