ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/02_signals.t
Revision: 1.2
Committed: Mon Dec 11 01:16:09 2006 UTC (17 years, 6 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-2_6, rel-2_5, rel-2_55, rel-2_51, rel-2_52
Changes since 1.1: +5 -3 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 $|=1;
2 root 1.2 BEGIN { print "1..6\n" }
3 root 1.1
4     use AnyEvent;
5    
6     print "ok 1\n";
7    
8     my $cv = AnyEvent->condvar;
9    
10     my $sw = AnyEvent->signal (signal => 'CHLD', cb => sub {
11     print "ok 3\n";
12     $cv->broadcast;
13     });
14    
15     print "ok 2\n";
16     kill 'CHLD', 0;
17     $cv->wait;
18    
19 root 1.2 print "ok 4\n";
20    
21 root 1.1 undef $sw;
22    
23 root 1.2 print "ok 5\n";
24 root 1.1
25     kill 'CHLD', 0;
26    
27 root 1.2 print "ok 6\n";