POE::Wheel: No CloseEvent unless StderrEvent?

[email protected]
Newsgroups gmane.comp.lang.perl.poe
Message-ID <[email protected]>
Just stumbled across this odd POE::Wheel behavior, would be great if you
could take a look:

In the following code snippet, POE::Wheel::Run doesn't jump to the
"close_state" defined as the wheel's CloseEvent:

     use POE;
     use POE::Wheel::Run;

     POE::Session->create(
       inline_states => {
 	_start => sub {
 	    my($heap) = @_[HEAP];

 	    $heap->{wheel} = POE::Wheel::Run->new(
 	      Program => "cat",
 	      ProgramArgs => ["/dev/null"],
 	      CloseEvent => "close_state",
 	      StdinEvent => "blah",
 	    );
 	},
 	close_state => sub {
 	    my($heap) = @_[HEAP];
 	    delete $heap->{ wheel };
 	    print "Closed!\n";
 	},
       },
     );

     POE::Kernel->run();

If you comment out

     #StdinEvent => "blah",

and put in

     StderrEvent => "blah",

instead, it works.

On a completly unrelated subject, if you add

     POE::Kernel->sig(CHLD => "your_event");

right before the kernel run() call (not sure if that makes sense since
at this point there's no current session, but nevertheless), the program
doesn't terminate.

By the way, I filed this under

     http://rt.cpan.org/Ticket/Display.html?id=38908

Would be great if you could check it out, thanks!

-- Mike
Mike Schilli
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.