summaryrefslogtreecommitdiff
path: root/rts/Schedule.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-03-29 13:23:29 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-03-29 13:23:29 +0000
commitf125eb7e4b8079e79f41f55d60e5b4bf138284ba (patch)
treef5c0c21acff6833e089e9ece3537224e665961cd /rts/Schedule.c
parent1991d6e39c1902c8877397622132bb7d6c7c5ebc (diff)
downloadhaskell-f125eb7e4b8079e79f41f55d60e5b4bf138284ba.tar.gz
avoid a fork deadlock (see comments)
Diffstat (limited to 'rts/Schedule.c')
-rw-r--r--rts/Schedule.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c
index 70e0246fbe..e3d025a180 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;
}
}
}