Subject: | POE::Wheel::Run: No CloseEvent unless StderrEvent defined |
Just stubled 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.
Would be great if you could check it out, thanks!
-- Mike