Hi, I want to use a thread in concurrent haskell to manage a posix fork/exec/wait. I expected the test code attached below to output "recovering result" once, instead I get "recovering result" twice. Can anyone shed some light on whats going wrong?
(ghci 5.02.1 x86 linux) Thanks /Marcus > module Test where > import Concurrent > import Posix > main = do > mv <- newEmptyMVar > forkIO $ do x <- forkProcess > case x of > Nothing -> do > executeFile "sleep" True ["2"] Nothing > error "oops" > Just pid -> > getProcessStatus True False pid > putMVar mv () > print "recovering result" > takeMVar mv _______________________________________________ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
