Subprocesses (was: [ANNOUNCE] shell-haskell 1.0.0)

David Roundy droundy@abridgegame.org
Fri, 9 May 2003 07:33:01 -0400


On Fri, May 09, 2003 at 11:03:13AM +0100, Simon Marlow wrote:
> 
> David Sankel's shell-haskell creates pipes for stdin/stdout/stderr, and
> lets you communicate interactively with the sub-process via Handles.  It
> could do with a way to specify the environment and working directory of
> the sub-process (ala POpen and runProcess), but apart from that it seems
> to be the most flexible of the four.  It could be simplified slightly by
> using one Handle rather than two for stdin/stdout.

You need to have two rather than one handle if you want to know when the
process is finishing outputting.  Otherwise its output filehandle will
never reach EOF.  Generally you won't want to close the output and input
Handles simultaneously.
-- 
David Roundy
http://www.abridgegame.org