Proposal: overhaul System.Process
Simon Marlow
marlowsd at gmail.com
Tue Apr 22 18:45:27 EDT 2008
Bryan O'Sullivan wrote:
> Neil Mitchell wrote:
>
>> I would have thought (ExitCode,String) was more appropriate.
>
> Yes, definitely.
Good point. Although I'm not sure I'm keen on readProcess being lazy
(but you can have a lazy variant if you want).
> What happens to stderr with this function, by the way?
> Is it tied to stdout (probably the right thing to do), or to /dev/null,
> or is it closed (eek!)?
None of the above :) Currently it's inherited from the parent.
Unfortunately it's not easy to tie stderr and stdout to the same pipe -
createProcess can't do that, and readProcess is defined in terms of it.
> It would be useful if there was a readProcess variant that gave back a
> String each for stdout and stderr.
Would it be reasonable for that to be the only variant?
Cheers,
Simon
More information about the Libraries
mailing list