[Haskell-cafe] Re: Execution of external command

David Waern david.waern at gmail.com
Thu Dec 13 11:17:09 EST 2007


2007/12/13, Simon Marlow <simonmarhaskell at gmail.com>:
> Bulat Ziganshin wrote:
> > Hello Duncan,
> >
> > Thursday, December 13, 2007, 4:43:17 PM, you wrote:
> >
> >> Use just the GHC bit from the code I pointed at:
> >
> > thank you, Duncan. are there any objections against simplest code
> > proposed by Yitzchak? i.e.
> >
> > (_, h, _, _) <- runInteractiveCommand "script params"
> > output <- hGetContents h
> >
> > taking into account that bad-behaved scripts are not my headache?
>
> It could deadlock if the script produces enough stderr to fill up its pipe
> buffer, because the script will stop waiting for your program to empty the
> pipe.
>
> It's been said several times, but we should really have a higher-level
> abstraction over runInteractiveProcess.

I think Don started something: http://www.cse.unsw.edu.au/~dons/code/newpopen/

David


More information about the Haskell-Cafe mailing list