It means the process has ended, but it hasn't been reaped (using waitpid) by its parent yet.
The following code should reap the children as they end, instead of in the order they were created:
foreach my $row (@$sections) { if (my $pid = fork) { $pids{$pid}++; } else { ... } } while (%pids) { my $pid = waitpid(-1, 0); delete $pids{$pid}; }
By the way, have you considered Parallel::ForkManager? It seems ideal in this situation.
Update: Added code.
In reply to Re: fork and zombies
by ikegami
in thread fork and zombies
by Gangabass
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |