Revision: | 1.4 |
Committed: | Tue Mar 5 18:37:43 2013 UTC (11 years, 4 months ago) by root |
Content type: | application/x-troff |
Branch: | MAIN |
CVS Tags: | rel-6_5, rel-6_512, rel-6_513, rel-6_511, rel-6_514, rel-6_32, rel-6_33, rel-6_31, rel-6_36, rel-6_37, rel-6_38, rel-6_39, rel-6_29, rel-6_28, rel-6_46, rel-6_45, rel-6_51, rel-6_52, rel-6_53, rel-6_54, rel-6_55, rel-6_56, rel-6_57, rel-6_43, rel-6_42, rel-6_41, rel-6_47, rel-6_44, rel-6_49, rel-6_48, HEAD |
Changes since 1.3: | +1 -1 lines |
Log Message: | *** empty log message *** |
# | User | Rev | Content |
---|---|---|---|
1 | root | 1.3 | BEGIN { |
2 | if ($^O =~ /mswin32/i) { | ||
3 | print <<EOF; | ||
4 | 1..0 # Perl binary broken, skipping test. Upgrading to a working perl is advised. | ||
5 | EOF | ||
6 | exit 0; | ||
7 | } | ||
8 | } | ||
9 | |||
10 | root | 1.1 | BEGIN { $| = 1; print "1..5\n"; } |
11 | |||
12 | use Coro; | ||
13 | |||
14 | print "ok 1\n"; | ||
15 | |||
16 | my $pid = fork or do { | ||
17 | my $old_idle = $Coro::idle; | ||
18 | $Coro::idle = sub { | ||
19 | print "ok 2\n"; | ||
20 | close STDERR; | ||
21 | close STDOUT; | ||
22 | $old_idle->(); | ||
23 | }; | ||
24 | schedule; | ||
25 | root | 1.2 | exit 3; |
26 | root | 1.1 | }; |
27 | |||
28 | root | 1.2 | waitpid $pid, 0; |
29 | root | 1.1 | |
30 | root | 1.2 | 3 == $? >> 8 |
31 | root | 1.1 | ? "not " : "", "ok 3\n"; |
32 | |||
33 | my $coro = new Coro sub { | ||
34 | print "ok 5\n"; | ||
35 | root | 1.4 | Coro::Util::_exit 0; |
36 | root | 1.1 | }; |
37 | |||
38 | $Coro::idle = sub { | ||
39 | $coro->ready; | ||
40 | }; | ||
41 | |||
42 | print "ok 4\n"; | ||
43 | |||
44 | schedule; | ||
45 | die; |