Simon Marlow writes:
test1 :: IO ()
test1 = do
(_,_,_, pid) - runInteractiveProcess /usr/bin/sleep
[3] Nothing Nothing
sleep 1
rc - waitForProcess pid
print rc
I can't repeat this, it works here:
*Main test1
ExitSuccess
*Main test2
Just ExitSuccess
I can't repeat this, it works here:
*Main test1
ExitSuccess
*Main test2
Just ExitSuccess
(after changing /usr/bin/sleep to /bin/sleep).
The only thing I can think of is that you somehow have a SIGCHLD handler
that calls wait(), but I don't see where that can be happening. GHC
doesn't have any
I managed to get runInteractiveProcess to work after all.
Here is the code:
import System.Posix.Signals
import System.IO hiding ( catch, try )
import System.Exit ( ExitCode(..) )
import System.Process
import Control.Concurrent
import Child -- http://cryp.to/child/Child.hs
test :: IO ()