ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/t/11_deadlock.t
Revision: 1.1
Committed: Mon Dec 4 03:54:46 2006 UTC (17 years, 6 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-3_41, rel-3_55, rel-3_51, rel-3_4, rel-3_1, rel-3_5, rel-3_3, rel-3_2, rel-3_11, rel-3_501
Log Message:
*** empty log message ***

File Contents

# Content
1 BEGIN { $| = 1; print "1..5\n"; }
2
3 use Coro;
4
5 print "ok 1\n";
6
7 my $pid = fork or do {
8 my $old_idle = $Coro::idle;
9 $Coro::idle = sub {
10 print "ok 2\n";
11 close STDERR;
12 close STDOUT;
13 $old_idle->();
14 };
15 schedule;
16 exit(253);
17 };
18
19 print
20 253 == (waitpid $pid, 0) >> 8
21 ? "not " : "", "ok 3\n";
22
23 my $coro = new Coro sub {
24 print "ok 5\n";
25 Coro::State::_exit 0;
26 };
27
28 $Coro::idle = sub {
29 $coro->ready;
30 };
31
32 print "ok 4\n";
33
34 schedule;
35 die;