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

Comparing AnyEvent/t/03_child.t (file contents):
Revision 1.22 by root, Sat Oct 1 22:39:29 2011 UTC vs.
Revision 1.23 by root, Fri Mar 30 04:22:22 2012 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines