(_,h,e,_) <- runInteractiveCommand "script params"
clearStderr
output <- hGetContents h

where clearStderr is one of:

1. hClose e
2. hGetContents e >>= evaluate . last
3. forkIO (hGetContents e >>= evaluate . last >> return ())

all seem to work for me on Mac OS. Only 2 hangs on
Debian testing. What happens on Windows?

I ran the following command:

"for((i=0;i<10000;++i));do cat non_existant; echo aaaaaaaaaaaaaaa; done; date"

(varying the number of iterations to clog up both
pipe buffers)

Is this really such a problem?

Thanks,
Yitz
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to