ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Async-Interrupt/t/02_pipe.t
(Generate patch)

Comparing Async-Interrupt/t/02_pipe.t (file contents):
Revision 1.2 by root, Thu Jul 2 15:17:57 2009 UTC vs.
Revision 1.3 by root, Sat Jul 11 22:16:50 2009 UTC

9unless (socketpair $pr, $pw, Socket::AF_UNIX (), Socket::SOCK_STREAM (), 0) { 9unless (socketpair $pr, $pw, Socket::AF_UNIX (), Socket::SOCK_STREAM (), 0) {
10 print "1..0 # SKIP socketpair failed - broken platform, skipping tests\n"; 10 print "1..0 # SKIP socketpair failed - broken platform, skipping tests\n";
11 exit; 11 exit;
12} 12}
13 13
14print "1..10\n"; $|=1; 14print "1..12\n"; $|=1;
15 15
16use Async::Interrupt; 16use Async::Interrupt;
17 17
18# we ignore the requirement to put handles into nonblocking mode 18# we ignore the requirement to put handles into nonblocking mode
19# IN THIS TEST only. never do that in real life. 19# IN THIS TEST only. never do that in real life.
42 42
43$ai->signal (9); 43$ai->signal (9);
44 44
45my $n = select $vR=$vr, undef, undef, 0; 45my $n = select $vR=$vr, undef, undef, 0;
46print $n == 0 ? "" : "not ", "ok 10 # $n\n"; 46print $n == 0 ? "" : "not ", "ok 10 # $n\n";
47
48$ai->pipe_disable;
49$ai->scope_block;
50
51$ai->signal (12);
52
53my $n = select $vR=$vr, undef, undef, 0;
54print $n == 0 ? "" : "not ", "ok 11 # $n\n";
55
56undef $ai; # will cause signal to be sent
57

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines