--- AnyEvent/t/65_event_03_child.t 2011/10/01 22:39:29 1.12 +++ AnyEvent/t/65_event_03_child.t 2012/03/30 04:25:11 1.14 @@ -45,6 +45,13 @@ unless ($pid) { print "ok ${it}2 # child $$\n"; + + # POE hits a race condition when the child dies too quickly + # because it checks for child exit before installing the signal handler. + # seen in version 1.352 - earlier versions had the same bug, but + # polled for child exits regularly, so only caused a delay. + sleep 1 if $AnyEvent::MODEL eq "AnyEvent::Impl::POE"; + POSIX::_exit 3; } my $w = AnyEvent->child (pid => $pid, cb => sub { @@ -55,7 +62,10 @@ $cv->recv; - my $pid2 = fork || POSIX::_exit 7; + my $pid2 = fork || do { + sleep 1 if $AnyEvent::MODEL eq "AnyEvent::Impl::POE"; + POSIX::_exit 7; + }; my $cv2 = AnyEvent->condvar;