X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FSchedule.c;h=e328b5b8cf3444c44e2ebef1ffbf167f85fe7c3e;hb=78c491b13bd3afea76a8bb3f30d13e417c768941;hp=a7a0f33872ff1048c68a1673e07fff7a3d351f85;hpb=911b42b27ad5f039465d14052460e2d9dde053ab;p=ghc-hetmet.git diff --git a/rts/Schedule.c b/rts/Schedule.c index a7a0f33..e328b5b 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -643,7 +643,7 @@ run_thread: t->saved_errno = errno; #if mingw32_HOST_OS // Similarly for Windows error code - SetLastError(t->saved_winerror); + t->saved_winerror = GetLastError(); #endif #if defined(THREADED_RTS) @@ -2195,6 +2195,10 @@ forkProcess(HsStablePtr *entry cap->returning_tasks_tl = NULL; #endif + // On Unix, all timers are reset in the child, so we need to start + // the timer again. + startTimer(); + cap = rts_evalStableIO(cap, entry, NULL); // run the action rts_checkSchedStatus("forkProcess",cap);