… | |
… | |
9 | unless (socketpair $pr, $pw, Socket::AF_UNIX (), Socket::SOCK_STREAM (), 0) { |
9 | unless (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 | |
14 | print "1..10\n"; $|=1; |
14 | print "1..12\n"; $|=1; |
15 | |
15 | |
16 | use Async::Interrupt; |
16 | use 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 | |
45 | my $n = select $vR=$vr, undef, undef, 0; |
45 | my $n = select $vR=$vr, undef, undef, 0; |
46 | print $n == 0 ? "" : "not ", "ok 10 # $n\n"; |
46 | print $n == 0 ? "" : "not ", "ok 10 # $n\n"; |
|
|
47 | |
|
|
48 | $ai->pipe_disable; |
|
|
49 | $ai->scope_block; |
|
|
50 | |
|
|
51 | $ai->signal (12); |
|
|
52 | |
|
|
53 | my $n = select $vR=$vr, undef, undef, 0; |
|
|
54 | print $n == 0 ? "" : "not ", "ok 11 # $n\n"; |
|
|
55 | |
|
|
56 | undef $ai; # will cause signal to be sent |
|
|
57 | |