Dougal Stanton wrote:
do
(hin, hout, herr, ph) <- runInteractiveProcess cmd args Nothing Nothing
forkIO $ hPutStr hin content >> hClose hin
out <- hGetContents hout
return (ph, out)
which seems to require threading. If I compile without, it will hang
indefinitely, I presume deadlocked. Is there a way this can be done
without threading?
With much sweat, you could write your own timed polling loop and avoid
threads, using hPutBufNonBlocking and hGetBufNonBlocking. I don't
recommend it, except for fun or self-torture.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe