ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Async-Interrupt/t/03_signal.t
Revision: 1.4
Committed: Tue Jul 28 01:20:40 2009 UTC (14 years, 11 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-1_1, rel-1_0, rel-1_2, rel-1_02, rel-1_03, rel-1_01, rel-1_04, rel-1_05, rel-1_24, rel-1_25, rel-1_26, rel-1_21, rel-1_22, rel-1_23, HEAD
Changes since 1.3: +1 -0 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 $ai->scope_block;
21 kill CHLD => $$;
22 print "ok 2\n";
23 }
24
25 kill CHLD, $$;
26
27 $ai->signal_hysteresis (1);
28
29 kill CHLD, $$;
30 kill CHLD, $$;
31 kill CHLD, $$;
32 kill CHLD, $$;
33
34 print "ok 9\n";
35
36