You need to reverse your tests, and check for undef'ness of $pid first. For enlightenment as to why, ponder on print undef == 0 ? "true!\n" : "false\n";# create new directory here if (($pid = fork()) == 0) { # remove directory here } if (!defined($pid)) { # log fork() failure here # remove directory here }
In reply to Re: mysterious fork() failure
by dws
in thread mysterious fork() failure
by Marcello
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |