Glib child processes
Marc Lehmann
schmorp at schmorp.de
Sat Aug 6 12:56:20 CEST 2011
On Sat, Aug 06, 2011 at 10:41:43AM +1000, Kevin Ryde <user42 at zip.com.au> wrote:
> > - a pid of 0 is no longer working
>
> Oops, I didn't pay attention to that.
Well, it's like that - I found no reasonable way to implement it, so Glib
will have to stay the only event loop that doesn't do it.
> > - glib itself claims that only one watcher is supported,
>
> I think that may be so.
This is being worked around in current CVS.
> I suppose taking over SIGCHLD for the pid==0 all-processes case would
> work. Eg. untested,
Right, but that would be too much action at a distance, and:
> But maybe if an AnyEvent program thinks it can reap all child processes
> then there wouldn't be any such other individual listens.
This is wrong, but by definition - AnyEvent is not for programs, but for
modules and libraries. The assumption that an AnyEvent "program" does
this is therefore wrong, because AnyEvent users do not control the whole
program.
i.e. that would invalidate the typical use of running some child process
and waiitng for it in a library, e.g. AnyEvent::Util.
> the docs. Might be better than a poke in the eye even if it's a bit
> inconsistent.
Well, AnyEvent did say that this is a widely supported, but not a portable
feature, so any such program would already be noncompliant to the API.
Tough, but not easily liftable, the problem is deep inside glib.
Thanks :)
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
-=====/_/_//_/\_,_/ /_/\_\
More information about the anyevent
mailing list