runInteractiveProcess, confused

Frederik Eaton frederik at a5.repetae.net
Wed May 18 09:46:44 EDT 2005


Hi,

When I run the following line in ghci:

Prelude System.Process Control.Concurrent System.IO> do { (inp, out, err, ph) <- runInteractiveProcess "cat" [] Nothing Nothing; forkIO (do hPutStr inp "this\nis\na\ntest\n"; hClose inp); waitForProcess ph }

... it doesn't terminate. I'm following the example in the
System.Process documentation. But I would think that since I close
'inp', "cat" would terminate. Also, I don't see the expected output.

Frederik

-- 
http://ofb.net/~frederik/


More information about the Glasgow-haskell-users mailing list