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

Comparing AnyEvent/t/69_ev_03_child.t (file contents):
Revision 1.5 by root, Sat Jul 18 05:19:09 2009 UTC vs.
Revision 1.8 by root, Mon Jul 4 21:14:30 2011 UTC

1use POSIX (); 1use POSIX ();
2 2
3no warnings; 3no warnings;
4
5use AnyEvent;
6BEGIN { eval q{use AnyEvent::Impl::EV;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::EV not found}), exit 0) }
7 4
8BEGIN { 5BEGIN {
9 # check for broken perls 6 # check for broken perls
10 if ($^O =~ /mswin32/i) { 7 if ($^O =~ /mswin32/i) {
11 my $ok; 8 my $ok;
12 local $SIG{CHLD} = sub { $ok = 1 }; 9 local $SIG{CHLD} = sub { $ok = 1 };
13 kill 'CHLD', 0; 10 kill 'CHLD', 0;
14 11
15 unless ($ok) { 12 unless ($ok) {
16 print <<EOF; 13 print <<EOF;
171..0 # Your perl interpreter is badly BROKEN. Child watchers will not work, ever. Try upgrading to a newer perl or a working perl (cygwin's perl is known to work). If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT WORK. 141..0 # SKIP Your perl interpreter is badly BROKEN. Child watchers will not work, ever. Try upgrading to a newer perl or a working perl (cygwin's perl is known to work). If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT WORK.
18EOF 15EOF
19 exit 0; 16 exit 0;
20 } 17 }
21 } 18 }
22} 19}
23 20
21use AnyEvent;
22BEGIN { eval q{use AnyEvent::Impl::EV;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::EV not loadable
23}), exit 0) }
24
24$| = 1; print "1..50\n"; 25$| = 1; print "1..50\n";
25 26
27$AnyEvent::MAX_SIGNAL_LATENCY = 0.2;
28
26for my $it ("", 1, 2, 3, 4) { 29for my $it ("", 1, 2, 3, 4) {
27 $AnyEvent::MAX_SIGNAL_LATENCY = 1;
28
29 print "ok ${it}1\n"; 30 print "ok ${it}1\n";
30 31
31 AnyEvent::detect; # force-load event model 32 AnyEvent::detect; # force-load event model
32 33
33 my $pid = fork; 34 my $pid = fork;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines