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.13 by root, Thu Jul 9 22:37:53 2009 UTC vs.
Revision 1.14 by root, Fri Jul 17 22:05:12 2009 UTC

21 21
22use POSIX (); 22use POSIX ();
23 23
24use AnyEvent; 24use AnyEvent;
25use AnyEvent::Impl::Perl; 25use AnyEvent::Impl::Perl;
26
27$AnyEvent::MAX_SIGNAL_LATENCY = 1;
26 28
27print "ok 1\n"; 29print "ok 1\n";
28 30
29AnyEvent::detect; # force-load event model 31AnyEvent::detect; # force-load event model
30 32
58 print $pid2 == $_[0] ? "" : "not ", "ok 5 # $pid2 == $_[0]\n"; 60 print $pid2 == $_[0] ? "" : "not ", "ok 5 # $pid2 == $_[0]\n";
59 print 7 == ($_[1] >> 8) ? "" : "not ", "ok 6 # 7 == $_[1] >> 8 ($_[1])\n"; 61 print 7 == ($_[1] >> 8) ? "" : "not ", "ok 6 # 7 == $_[1] >> 8 ($_[1])\n";
60 $cv2->broadcast; 62 $cv2->broadcast;
61}); 63});
62 64
63my $error = AnyEvent->timer (after => 15, cb => sub { 65my $error = AnyEvent->timer (after => 5, cb => sub {
64 print <<EOF; 66 print <<EOF;
65Bail out! No child exit detected. This is either a bug in AnyEvent or a bug in your Perl (mostly some windows distributions suffer from that): child watchers might not work properly on this platform. You can force installation of this module if you do not rely on child watchers, or you could upgrade to a working version of Perl for your platform.\n"; 67Bail out! No child exit detected. This is either a bug in AnyEvent or a bug in your Perl (mostly some windows distributions suffer from that): child watchers might not work properly on this platform. You can force installation of this module if you do not rely on child watchers, or you could upgrade to a working version of Perl for your platform.\n";
66EOF 68EOF
67 exit 0; 69 exit 0;
68});
69
70my $inter = AnyEvent->timer (after => 14, cb => sub {
71 print "not ok 5 # inter\n";
72 print "not ok 6 # inter\n";
73 $cv2->send;
74}); 70});
75 71
76$cv2->wait; 72$cv2->wait;
77 73
78print "ok 7\n"; 74print "ok 7\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines