[Haskell-cafe] Re: Execution of external command
Yitzchak Gale
gale at sefer.org
Thu Dec 13 13:07:15 EST 2007
(_,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
More information about the Haskell-Cafe
mailing list