Glib child processes
Kevin Ryde
user42 at zip.com.au
Sat Aug 6 02:41:43 CEST 2011
Marc Lehmann <schmorp at schmorp.de> writes:
>
> - a pid of 0 is no longer working
Oops, I didn't pay attention to that.
> - glib itself claims that only one watcher is supported,
I think that may be so.
> is this limitation being lifted in the Glib perl interface
> or does this
> need a workaround in AnyEvent?
Hmm. I can't think of much Perl-Glib might do about it. It sticks
fairly closely to what glib etc covers.
> (I think you wrote the implementatioon for that too :),
Yep :-).
> OTOH, although AnyEvent doesn't claim it works for all event loops,
> without this ability, I just checked and Glib would be the only event loop
> that would lack this ability then, so it would be quite nice to keep this
> functionality, if possible.
Yes, if possible.
I suppose taking over SIGCHLD for the pid==0 all-processes case would
work. Eg. untested,
if ($pid == 0) {
return shift->SUPER::watch_add(@_);
}
That'd break glib code listening for individual processes (cooperating
there being the original motivation of course). But maybe if an
AnyEvent program thinks it can reap all child processes then there
wouldn't be any such other individual listens. Could be discussed in
the docs. Might be better than a poke in the eye even if it's a bit
inconsistent.
--
The NCSC sent me a letter querying some of my recent share transactions.
I was disappointed not to find a cheque enclosed. The people I know who
get these sort of letters are all millionaires so I assumed they must
enclose money too.
More information about the anyevent
mailing list