From d33bd45975c7a9dd54ae04ea1bcf890fb428b863 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 26 Feb 2003 10:22:14 +0000 Subject: [PATCH] [project @ 2003-02-26 10:22:14 by simonmar] Add a note about the problem with forkProcess, for the time being. --- GHC/Conc.lhs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/GHC/Conc.lhs b/GHC/Conc.lhs index cb57319..cf15836 100644 --- a/GHC/Conc.lhs +++ b/GHC/Conc.lhs @@ -161,6 +161,9 @@ that only the desired thread is running after the fork(). The stopped threads are /not/ garbage collected! This behaviour may change in future releases. + +NOTE: currently, main threads are not stopped in the child process. +To work around this problem, call 'forkProcessPrim' from the main thread. -} forkProcessPrim :: IO Int @@ -169,6 +172,9 @@ forkProcessPrim = IO $ \s -> case (forkProcess# s) of (# s1, id #) -> (# s1, (I# {- | 'forkProcess' is a wrapper around 'forkProcessPrim' similar to the one found in "Posix.forkProcess" which returns a Maybe-type. The child receives @Nothing@, the parent @Just (pid::Int)@. In case of an error, an exception is thrown. + +NOTE: currently, main threads are not stopped in the child process. +To work around this problem, call 'forkProcess' from the main thread. -} forkProcess :: IO (Maybe Int) -- 1.7.10.4