From f125eb7e4b8079e79f41f55d60e5b4bf138284ba Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Mon, 29 Mar 2010 13:23:29 +0000 Subject: [PATCH] avoid a fork deadlock (see comments) --- rts/Schedule.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rts/Schedule.c b/rts/Schedule.c index 70e0246..e3d025a 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -1713,6 +1713,13 @@ forkProcess(HsStablePtr *entry // exception, but we do want to raiseAsync() because these // threads may be evaluating thunks that we need later. deleteThread_(cap,t); + + // stop the GC from updating the InCall to point to + // the TSO. This is only necessary because the + // OSThread bound to the TSO has been killed, and + // won't get a chance to exit in the usual way (see + // also scheduleHandleThreadFinished). + t->bound = NULL; } } } -- 1.7.10.4