ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/t/04_fork.t
Revision: 1.1
Committed: Tue Aug 16 22:22:18 2005 UTC (18 years, 10 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-1_2
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 #!/usr/bin/perl
2    
3     use Test;
4     use IO::AIO;
5    
6     # this is a lame test, but....
7    
8     BEGIN { plan tests => 9 }
9    
10     IO::AIO::min_parallel 2;
11    
12     print "ok 1\n";
13    
14     aio_stat "/", sub {
15     print "ok 2\n"; # pre-fork
16     };
17    
18     if (open FH, "-|") {
19     print while <FH>;
20     aio_stat "/", sub {
21     print "ok 7\n";
22     };
23     print "ok 6\n";
24     IO::AIO::poll;
25     print "ok 8\n";
26     } else {
27     print "ok 3\n";
28     aio_stat "/", sub {
29     print "ok 4\n";
30     };
31     IO::AIO::poll;
32     print "ok 5\n";
33     exit;
34     }
35    
36     print "ok 9\n";
37