ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-Fork/t/01_early.t
Revision: 1.3
Committed: Thu Apr 4 04:23:07 2013 UTC (11 years, 2 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-1_1, rel-1_0, rel-1_3, rel-1_2, rel-0_2, rel-0_5, rel-0_6, rel-0_7, rel-0_01, rel-1_32, rel-1_31, HEAD
Changes since 1.2: +8 -2 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 BEGIN { $| = 1; print "1..3\n"; }
2
3 use AnyEvent::Fork::Early;
4
5 if (1) {
6 #d# win32 perls corrupt memory when forking early
7 print "ok 1\n";
8 $AnyEvent::Fork::EARLY = AnyEvent::Fork->new_exec;
9 } else {
10 print $AnyEvent::Fork::TEMPLATE == $AnyEvent::Fork::EARLY ? "" : "not ", "ok 1\n";
11 }
12
13 $AnyEvent::Fork::EARLY->eval ('syswrite STDOUT, "ok 2\n"; exit 0');
14
15 my $w = AE::io $AnyEvent::Fork::EARLY->[1], 0, my $cv = AE::cv;
16 $cv->recv;
17
18 print "ok 3\n";