ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/67_tk_03_child.t
(Generate patch)

Comparing AnyEvent/t/67_tk_03_child.t (file contents):
Revision 1.12 by root, Sat Oct 1 22:39:29 2011 UTC vs.
Revision 1.13 by root, Fri Mar 30 04:22:22 2012 UTC

43 43
44 my $cv = AnyEvent->condvar; 44 my $cv = AnyEvent->condvar;
45 45
46 unless ($pid) { 46 unless ($pid) {
47 print "ok ${it}2 # child $$\n"; 47 print "ok ${it}2 # child $$\n";
48
49 # POE hits a race condition when the child dies too quickly
50 # because it checks for child exit before installing the signal handler.
51 # seen in version 1.352 - earlier versions had the same bug, but
52 # polled for child exits regularly, so only caused a delay.
53 sleep 1 if $AnyEvent::MODEL eq "POE";
54
48 POSIX::_exit 3; 55 POSIX::_exit 3;
49 } 56 }
50 my $w = AnyEvent->child (pid => $pid, cb => sub { 57 my $w = AnyEvent->child (pid => $pid, cb => sub {
51 print $pid == $_[0] ? "" : "not ", "ok ${it}3\ # $pid == $_[0]\n"; 58 print $pid == $_[0] ? "" : "not ", "ok ${it}3\ # $pid == $_[0]\n";
52 print 3 == ($_[1] >> 8) ? "" : "not ", "ok ${it}4 # 3 == $_[1] >> 8 ($_[1])\n"; 59 print 3 == ($_[1] >> 8) ? "" : "not ", "ok ${it}4 # 3 == $_[1] >> 8 ($_[1])\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines