diff --git a/rts/Schedule.c b/rts/Schedule.c index 061de639b28f2ea1e1c0b7ff87f5e09d0309e9f2..204f356554e50ae97c903571f4315521728885ae 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -2157,7 +2157,6 @@ forkProcess(HsStablePtr *entry // On Unix, all timers are reset in the child, so we need to start // the timer again. initTimer(); - startTimer(); // TODO: need to trace various other things in the child // like startup event, capabilities, process info etc @@ -2167,6 +2166,10 @@ forkProcess(HsStablePtr *entry ioManagerStartCap(&cap); #endif + // start timer after the IOManager is initialized + // (the idle GC may wake up the IOManager) + startTimer(); + // Install toplevel exception handlers, so interruption // signal will be sent to the main thread. // See #12903 diff --git a/rts/posix/itimer/Pthread.c b/rts/posix/itimer/Pthread.c index 73b1eba5def6401d34d0328e2138a0a8d6dd4a0e..738e5ec469cc3a3ebd09c3c7c0caf3ffadfecac5 100644 --- a/rts/posix/itimer/Pthread.c +++ b/rts/posix/itimer/Pthread.c @@ -168,7 +168,7 @@ void initTicker (Time interval, TickProc handle_tick) { itimer_interval = interval; - stopped = false; + stopped = true; exited = false; #if defined(HAVE_SIGNAL_H) sigset_t mask, omask;