diff options
-rw-r--r-- | rts/Schedule.c | 5 | ||||
-rw-r--r-- | rts/posix/itimer/Pthread.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c index e0631482c9..c5a5041587 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -2194,7 +2194,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 @@ -2202,6 +2201,10 @@ forkProcess(HsStablePtr *entry initIOManagerAfterFork(&cap); + // 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 5098d4f117..84501acb6f 100644 --- a/rts/posix/itimer/Pthread.c +++ b/rts/posix/itimer/Pthread.c @@ -169,7 +169,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; |