… | |
… | |
25 | |
25 | |
26 | |
26 | |
27 | $| = 1; print "1..15\n"; |
27 | $| = 1; print "1..15\n"; |
28 | |
28 | |
29 | print "ok 1\n"; |
29 | print "ok 1\n"; |
|
|
30 | |
|
|
31 | $AnyEvent::MAX_SIGNAL_LATENCY = 0.05; |
30 | |
32 | |
31 | my ($a, $b) = AnyEvent::Util::portable_socketpair; |
33 | my ($a, $b) = AnyEvent::Util::portable_socketpair; |
32 | |
34 | |
33 | # I/O write |
35 | # I/O write |
34 | { |
36 | { |
… | |
… | |
94 | print $s == 0 ? "" : "not ", "ok 6 # $s\n"; |
96 | print $s == 0 ? "" : "not ", "ok 6 # $s\n"; |
95 | |
97 | |
96 | kill INT => $$; |
98 | kill INT => $$; |
97 | |
99 | |
98 | $cv = AE::cv; |
100 | $cv = AE::cv; |
99 | $wt = AE::timer 0.1, 0, $cv; # maybe OS X needs more time here? |
101 | $wt = AE::timer 0.2, 0, $cv; # maybe OS X needs more time here? |
100 | |
102 | |
101 | $s = 0; |
103 | $s = 0; |
102 | $cv->recv; |
104 | $cv->recv; |
103 | |
105 | |
104 | print $s == 3 ? "" : "not ", "ok 7 # $s\n"; |
106 | print $s == 3 ? "" : "not ", "ok 7 # $s\n"; |
… | |
… | |
109 | $s = 0; |
111 | $s = 0; |
110 | $cv->recv; |
112 | $cv->recv; |
111 | |
113 | |
112 | print $s == 0 ? "" : "not ", "ok 8 # $s\n"; |
114 | print $s == 0 ? "" : "not ", "ok 8 # $s\n"; |
113 | } |
115 | } |
114 | |
|
|
115 | $AnyEvent::MAX_SIGNAL_LATENCY = 0.2; |
|
|
116 | |
116 | |
117 | # child |
117 | # child |
118 | { |
118 | { |
119 | my $cv = AE::cv; |
119 | my $cv = AE::cv; |
120 | my $wt = AE::timer 0.01, 0, $cv; |
120 | my $wt = AE::timer 0.01, 0, $cv; |