Why the test for $pid==-1 ? From perldoc -f fork:
returns the child pid to the parent process, 0 to the child process, or "undef" if the fork is unsuccessful.
the lowliest monk
In reply to Re^2: Forking and running all child processes at the same time
by tlm
in thread Forking and running all child processes at the same time
by chanakya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |