ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/02_signals.t
Revision: 1.3
Committed: Fri Nov 16 05:08:18 2007 UTC (16 years, 7 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-2_8, rel-2_9, rel-2_7, rel-3_0, rel-3_1, rel-3_11
Changes since 1.2: +1 -0 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 root 1.3 use AnyEvent::Impl::Perl;
6 root 1.1
7     print "ok 1\n";
8    
9     my $cv = AnyEvent->condvar;
10    
11     my $sw = AnyEvent->signal (signal => 'CHLD', cb => sub {
12     print "ok 3\n";
13     $cv->broadcast;
14     });
15    
16     print "ok 2\n";
17     kill 'CHLD', 0;
18     $cv->wait;
19    
20 root 1.2 print "ok 4\n";
21    
22 root 1.1 undef $sw;
23    
24 root 1.2 print "ok 5\n";
25 root 1.1
26     kill 'CHLD', 0;
27    
28 root 1.2 print "ok 6\n";