On Tue, Feb 11, 2003 at 02:05:55PM +1100, [EMAIL PROTECTED] wrote: > > 2. I am surprised that ErrorEvent is not triggered in that case. Are > > you using POE 0.25? If there is a problem in Wheel::Run, it would > > help greatly if you could submit a test case that reproduces it. > > I was running 0.24 on my system - I have updated this to 0.2501 from CVS and > the error persists. > > robin:/users/rc6286/workspace/dev/perl/pas > perl test.perl > Output: Died at -e line 1. > $VAR1 = 'read'; > $VAR2 = '0'; > $VAR3 = ''; > $VAR4 = 2; > $VAR5 = 'STDERR'; > $VAR1 = 'read'; > $VAR2 = '0'; > $VAR3 = ''; > $VAR4 = 2; > $VAR5 = 'STDOUT';
That output indicates ErrorEvent has been triggered twice. The first time when the child process closes STDERR, and the second time when it closes STDOUT. I added some extra output to the sample code: [...] 'close' => sub { delete $_[ HEAP ]->{'_task'}; print "closed\n"; }, 'error' => sub { print "error:\n",Dumper( @_[ ARG0 .. ARG4 ] ) }, Here's the new output, first using perl 5.005_03, and then using 5.6.1. 2) eyrie:~/public_html/tmp% perl5.00503 robt-casey-errorevent.perl Output: Died at -e line 1. error: $VAR1 = 'read'; $VAR2 = '0'; $VAR3 = ''; $VAR4 = 2; $VAR5 = 'STDOUT'; error: $VAR1 = 'read'; $VAR2 = '0'; $VAR3 = ''; $VAR4 = 2; $VAR5 = 'STDERR'; closed 2) eyrie:~/public_html/tmp% perl robt-casey-errorevent.perl Output: Died at -e line 1. error: $VAR1 = 'read'; $VAR2 = '0'; $VAR3 = ''; $VAR4 = 2; $VAR5 = 'STDERR'; error: $VAR1 = 'read'; $VAR2 = '0'; $VAR3 = ''; $VAR4 = 2; $VAR5 = 'STDOUT'; closed -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/