This one is more fail-safe, since you omitted the situation of a fork() failure.if (!defined($pid = fork())) { # FAILURE # parent process } elsif ($pid == 0) { # SUCCESS # child process } else { # SUCCESS # parent process }
In reply to Re: Re: basic fork question
by Marcello
in thread basic fork question
by sickboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |