X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FSelect.c;h=d7e6ffcdaa90e1acc319918d4fc26ba89afbc702;hb=324e96d2ebfcb113cd97c43ef043d591ef87de71;hp=677fdd2c8198103a9e0c095efc532593c405b113;hpb=aefc6956f4828708e1343cf4858296fc3141a176;p=ghc-hetmet.git diff --git a/ghc/rts/Select.c b/ghc/rts/Select.c index 677fdd2..d7e6ffc 100644 --- a/ghc/rts/Select.c +++ b/ghc/rts/Select.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Select.c,v 1.29 2003/06/26 12:22:59 stolz Exp $ + * $Id: Select.c,v 1.30 2003/10/01 10:49:09 wolfgang Exp $ * * (c) The GHC Team 1995-2002 * @@ -351,4 +351,20 @@ wakeBlockedWorkerThread() workerWakeupPending = rtsTrue; } } + +/* resetWorkerWakeupPipeAfterFork + * + * To be called right after a fork(). + * After the fork(), the worker wakeup pipe will be shared + * with the parent process, and that's something we don't want. + */ +void +resetWorkerWakeupPipeAfterFork() +{ + if(workerWakeupInited) { + close(workerWakeupPipe[0]); + close(workerWakeupPipe[1]); + } + workerWakeupInited = rtsFalse; +} #endif