I just made the minimum change to fix the problem.
It's not my favorite way of doing fork, which is:
if( my $pid = fork ) { # parent } elsif( defined $pid ) { # child exit; } else { die "$! on fork"; }
In reply to Re^3: fork - child executes code outside of block
by tybalt89
in thread fork - child executes code outside of block
by cyadav
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |