Calling an external command from a Haskell program

Volker Stolz stolz at i2.informatik.rwth-aachen.de
Wed Oct 22 11:27:10 EDT 2003


On Wed, Oct 22, 2003 at 09:24:28AM +0100, Simon Marlow wrote:
> > In local.libraries, you wrote:
> > > The sticking point is that GHC needs a
> > > thread-safe wait() implementation, which means some hacking in the
> > > scheduler (there isn't even a good way to do this portably, because
> > > select() doesn't let you wait for process termination).
> > 
> > *mumbl* libevent *mumbl*
> 
> I checked libevent, and it doesn't support wait() events.  It would be
> great if it did...

You can catch sigCHLD in the main event-loop and then invoke wait().
[This could even be possible in the current RTS by applying another 
incarnation of Wolfgang's pipe-hack]
-- 
Volker Stolz * http://www-i2.informatik.rwth-aachen.de/stolz/ * PGP * S/MIME


More information about the Libraries mailing list