… | |
… | |
17 | } |
17 | } |
18 | } |
18 | } |
19 | } |
19 | } |
20 | |
20 | |
21 | use AnyEvent; |
21 | use AnyEvent; |
22 | BEGIN { eval q{use AnyEvent::Impl::Tk;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::Tk not loadable}), exit 0) } |
22 | BEGIN { eval q{use AnyEvent::Impl::Tk;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::Tk not loadable |
|
|
23 | }), exit 0) } |
23 | |
24 | |
24 | $| = 1; print "1..50\n"; |
25 | $| = 1; print "1..50\n"; |
25 | |
26 | |
26 | $AnyEvent::MAX_SIGNAL_LATENCY = 0.2; |
27 | $AnyEvent::MAX_SIGNAL_LATENCY = 0.2; |
27 | |
28 | |
… | |
… | |
48 | print $pid == $_[0] ? "" : "not ", "ok ${it}3\ # $pid == $_[0]\n"; |
49 | print $pid == $_[0] ? "" : "not ", "ok ${it}3\ # $pid == $_[0]\n"; |
49 | print 3 == ($_[1] >> 8) ? "" : "not ", "ok ${it}4 # 3 == $_[1] >> 8 ($_[1])\n"; |
50 | print 3 == ($_[1] >> 8) ? "" : "not ", "ok ${it}4 # 3 == $_[1] >> 8 ($_[1])\n"; |
50 | $cv->broadcast; |
51 | $cv->broadcast; |
51 | }); |
52 | }); |
52 | |
53 | |
53 | $cv->wait; |
54 | $cv->recv; |
54 | |
55 | |
55 | my $pid2 = fork || POSIX::_exit 7; |
56 | my $pid2 = fork || POSIX::_exit 7; |
56 | |
57 | |
57 | my $cv2 = AnyEvent->condvar; |
58 | my $cv2 = AnyEvent->condvar; |
58 | |
59 | |
… | |
… | |
67 | Bail 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"; |
68 | Bail 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"; |
68 | EOF |
69 | EOF |
69 | exit 0; |
70 | exit 0; |
70 | }); |
71 | }); |
71 | |
72 | |
72 | $cv2->wait; |
73 | $cv2->recv; |
73 | |
74 | |
74 | print "ok ${it}7\n"; |
75 | print "ok ${it}7\n"; |
75 | print "ok ${it}8\n"; |
76 | print "ok ${it}8\n"; |
76 | print "ok ${it}9\n"; |
77 | print "ok ${it}9\n"; |
77 | print "ok ", $it*10+10, "\n"; |
78 | print "ok ", $it*10+10, "\n"; |