POE::Wheel::Run and sig_child

Mike Schilli <[email protected]> Tue, 20 Apr 2010 23:36:01 -0700 (PDT)
Newsgroups gmane.comp.lang.perl.poe
Message-ID <alpine.LRH.1.00.1004202333000.19219@pyramidlake.greatamerica.corp.yahoo.com>
I must be missing something obvious, as I'm getting

     in start at ./wheel line 14.
     starting ... at ./wheel line 27.
     killing process at ./wheel line 30.
     7353: !!! Child process PID:7354 reaped:
     7353: !!! Your program may not be using sig_child() to reap processes.
     7353: !!! In extreme cases, your program can force a system reboot
     7353: !!! if this resource leakage is not corrected.

although the code catches the sig_child:

     use strict;
     use warnings;
     use POE;
     use POE::Wheel::Run;

     my $session = POE::Session->create(
       inline_states => {
           _start => sub {
             warn "in start";
             $_[HEAP]->{wheel} =
             POE::Wheel::Run->new(
               Program     => "sleep",
               ProgramArgs => [60],
               CloseEvent  => "closing",
               ErrorEvent  => "closing",
               StderrEvent => "ignore",
             );

             $poe_kernel->sig_child($_[HEAP]->{wheel}->PID,
                                "sig_child");
             $poe_kernel->sig( "INT"  => "down" );
             warn "starting ...";
          },
          down => sub {
              warn "killing process";
              $_[HEAP]->{wheel}->kill();
          },
          sig_child => sub {
              warn("waitpid for " . [ARG1]);
              waitpid $_[ARG1], 0;
          },
      });

     $poe_kernel->run();

Looks like the 'sig_child' handler is never run ... suggestions?

-- Mike

Mike Schilli
[email protected]