Glib child processes

Kevin Ryde user42 at zip.com.au
Wed Apr 27 23:43:01 CEST 2011


(Resend requested by the rt autoreply.)

It could be good if AnyEvent::Impl::Glib used the recently wrapped
Glib::Child->watch_add(), so AnyEvent and Glib don't both try to install
SIGCHLD handlers.

With recent i386 debian AnyEvent 5.31 for instance the program foo.pl
below triggers the AnyEvent waiter, but the Glib one doesn't fire.

    perl foo.pl
    =>
    model AnyEvent::Impl::Glib
    native watch pid 8842
    AnyEvent watch pid 8844
    loop ...
    AnyEvent complete 8844 768

Or if swap the blocks to start the glib one second then that fires but
not the AnyEvent one.

It might be as easy as the few lines below.

Is there a notion of "priority" in AnyEvent that would be passed to that
Glib::Child->watch_add() too?  It has the usual glib levels like
G_PRIORITY_DEFAULT == 0, and higher numbers like G_PRIORITY_LOW == 300
for lower priority (yes, it's arse about, higher is lower and lower is
higher :-).



-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.pl
Type: text/x-perl
Size: 930 bytes
Desc: not available
URL: <http://lists.schmorp.de/pipermail/anyevent/attachments/20110428/c492ba6e/attachment.pl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Glib.pm.child-monitoring.diff
Type: text/x-diff
Size: 1581 bytes
Desc: not available
URL: <http://lists.schmorp.de/pipermail/anyevent/attachments/20110428/c492ba6e/attachment.diff>


More information about the anyevent mailing list