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.1 by root, Mon Dec 11 01:16:09 2006 UTC vs.
Revision 1.2 by root, Fri Nov 2 19:20:36 2007 UTC

1$|=1; 1$|=1;
2BEGIN { print "1..4\n" } 2BEGIN { print "1..5\n" }
3 3
4use AnyEvent; 4use AnyEvent;
5 5
6print "ok 1\n"; 6print "ok 1\n";
7 7
24 $cv->broadcast; 24 $cv->broadcast;
25}); 25});
26 26
27$cv->wait; 27$cv->wait;
28 28
29fork || exit 7;
30
31my $cv2 = AnyEvent->condvar;
32
33my $w2 = AnyEvent->child (pid => 0, cb => sub {
34 print 7 == ($? >> 8) ? "" : "not ", "ok 4\n";
35 $cv2->broadcast;
36});
37
38$cv2->wait;
39
29print "ok 4\n"; 40print "ok 5\n";
30 41
31 42
32 43
33 44

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines