Calling an external command from a Haskell program

Simon Marlow simonmar at
Thu Oct 23 13:13:04 EDT 2003


> >> 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]
> Why another incarnation? The "first incarnation" should do the job, 
> too. What's wrong with just safe-foreign-calling wait and relying on 
> the threaded RTS to do the job?

Sure, we could do that - and we could do it for the I/O library too and
remove all the select() stuff entirely.  But that would impose a
performance penalty on applications with large numbers of I/O-bound
threads, so we like to keep the lightweight mechanism too.  The same
argument applies to process waiting, although you could argue that it is
less convincing there, because there are probably not that many
applications which need to wait on thousands of processes.


More information about the Libraries mailing list