waitpid looks for a particular child, and other signals may be lost. I like to keep the pid's as keys in a hash and delete them as they die:
Trying to do that in a for loop assumes that child processes will halt in a particular order.delete $pid{+wait} while %pid;
After Compline,
Zaxo
In reply to Re: fork and zombies
by Zaxo
in thread fork and zombies
by Gangabass
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |