You should check the result of the fork() call - it CAN fail under certain circumstances:
my $child_id = fork; unless (defined $child_id) { die "Can't fork!"; } if ($child_id) { #in parent... } else { #in child }
In reply to Re^3: explain my code
by Joost
in thread explain my fork
by qbxk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |