--- AnyEvent/t/66_ioasync_03_child.t 2009/06/25 11:16:08 1.1 +++ AnyEvent/t/66_ioasync_03_child.t 2009/07/09 22:49:18 1.2 @@ -1,5 +1,3 @@ -$|=1; - BEGIN { # check for broken perls if ($^O =~ /mswin32/i) { @@ -17,12 +15,14 @@ } BEGIN { + $|=1; print "1..7\n" } +use POSIX (); + use AnyEvent; -use AnyEvent::Impl::IOAsync; -use IO::Async::Loop; AnyEvent::Impl::IOAsync::set_loop new IO::Async::Loop; +use AnyEvent::Impl::IOAsync; use IO::Async::Loop; AnyEvent::Impl::IOAsync::set_loop new IO::Async::Loop; print "ok 1\n"; @@ -39,7 +39,7 @@ unless ($pid) { print "ok 2\n"; - exit 3; + POSIX::_exit 3; } my $w = AnyEvent->child (pid => $pid, cb => sub { @@ -50,7 +50,7 @@ $cv->wait; -my $pid2 = fork || exit 7; +my $pid2 = fork || POSIX::_exit 7; my $cv2 = AnyEvent->condvar; @@ -60,13 +60,19 @@ $cv2->broadcast; }); -my $error = AnyEvent->timer (after => 5, cb => sub { +my $error = AnyEvent->timer (after => 15, cb => sub { print <timer (after => 14, cb => sub { + print "not ok 5 # inter\n"; + print "not ok 6 # inter\n"; + $cv2->send; +}); + $cv2->wait; print "ok 7\n";