in reply to In the BEGINing there were no forks?
Windows' fork emulation is just an emulation, and it shows a bug there. With a genuine fork you sould see:
or a possible but unlikely reversal of the middle two. Fork produces two processes where there was one, each continuing from the location of fork. Both processes see and do both print statements. Here's a version which skips "outer" for the child.inner outer inner outer
It would be more to the point to ask if Windoew' emulation can be fixed to match the real thing.BEGIN { my $cpid = fork; print "inner\n"; exit 0 unless $cpid; } print "outer\n";
Update: Oh, that's what you were asking. </sigh>
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: In the BEGINing there were no forks?
by Anonymous Monk on Feb 14, 2005 at 20:17 UTC |