ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Async-Interrupt/t/03_signal.t
Revision: 1.3
Committed: Tue Jul 28 01:19:44 2009 UTC (14 years, 11 months ago) by root
Content type: application/x-troff
Branch: MAIN
Changes since 1.2: +14 -3 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 unless (exists $SIG{USR1}) {
2 print "1..0 # SKIP no SIGUSR1 - broken platform, skipping tests\n";
3 exit;
4 }
5
6 print "1..9\n"; $|=1;
7
8 use Async::Interrupt;
9
10 my $three = 3;
11
12 my $ai = new Async::Interrupt
13 cb => sub { print "ok ", $three++, "\n" },
14 signal => "CHLD";
15
16 print "ok 1\n";
17
18 {
19 $ai->scope_block;
20 kill CHLD => $$;
21 print "ok 2\n";
22 }
23
24 kill CHLD, $$;
25
26 $ai->signal_hysteresis (1);
27
28 kill CHLD, $$;
29 kill CHLD, $$;
30 kill CHLD, $$;
31 kill CHLD, $$;
32
33 print "ok 9\n";
34
35