[Haskell-cafe] trying to understand runProcess handles

Matthias Fischmann fis at wiwi.hu-berlin.de
Fri Mar 3 13:35:54 EST 2006


On Fri, Mar 03, 2006 at 09:05:49AM -0800, Donn Cave wrote:
> To: haskell-cafe at haskell.org
> From: Donn Cave <donn at drizzle.com>
> Date: Fri, 3 Mar 2006 09:05:49 -0800 (PST)
> Subject: Re: [Haskell-cafe] trying to understand runProcess handles
> 
> On Thu, 2 Mar 2006, Matthias Fischmann wrote:
> ...
> > The problem is that gnuplot terminates right away after it tries to
> > read from stdin (I can see the shadow of a window appear and vanish
> > immediately).  I tried setFdOption, with no effect.  Is this because
> > the handles passed to runProcess are closed in the parent process, and
> > therefore the pipe is teared down and useless?
> > 
> > I don't think so: If I run 'find /' instead of gnuplot, the process
> > happily starts and I can hGetLine from stdout.
> 
> That doesn't necessarily disprove your hypothesis, since "find" doesn't
> read input.  You might try "tr" instead, for example.  I don't see
> anything about what you were doing that would be obviously different
> from runProcessInteractive, but as long as you're making a pipe for
> error output, you may as well read it and see if gnuplot has left
> any clue to its problem there.

that doesn't work -- all the handles are closed at least after the
process has died.  hard to tell whether the process dying caused the
handles to close or whether the handles were closed already by then.

m.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20060303/17ad206f/attachment.bin


More information about the Haskell-Cafe mailing list