Revision: 23068 http://trac.macosforge.org/projects/launchd/changeset/23068 Author: zarzycki@apple.com Date: 2007-02-15 08:12:24 -0800 (Thu, 15 Feb 2007) Log Message: ----------- <rdar://problem/4998703> launchd restarting on-demand service twice Modified Paths: -------------- trunk/launchd/src/launchd_core_logic.c Modified: trunk/launchd/src/launchd_core_logic.c =================================================================== --- trunk/launchd/src/launchd_core_logic.c 2007-02-14 21:45:13 UTC (rev 23067) +++ trunk/launchd/src/launchd_core_logic.c 2007-02-15 16:12:24 UTC (rev 23068) @@ -687,9 +687,6 @@ if (j->start_interval) { job_assumes(j, kevent_mod((uintptr_t)&j->start_interval, EVFILT_TIMER, EV_DELETE, 0, 0, NULL) != -1); } - if (j->exit_timeout) { - kevent_mod((uintptr_t)&j->exit_timeout, EVFILT_TIMER, EV_DELETE, 0, 0, NULL); - } kevent_mod((uintptr_t)j, EVFILT_TIMER, EV_DELETE, 0, 0, NULL); @@ -1654,6 +1651,10 @@ return; } + if (j->exit_timeout) { + kevent_mod((uintptr_t)&j->exit_timeout, EVFILT_TIMER, EV_DELETE, 0, 0, NULL); + } + total_children--; /* Performance hack */