in reply to Proc::Queue problem

I think you need to do a blocking wait for the children that you fork. It seems to work this way for me, but if you fork lots of processes, you may want to clean up some of the zombies as you go.

I modified this from the example in the Proc::Queue docs

#!/usr/bin/perl use strict; use warnings; use Proc::Queue 'waitpids', size => 4, debug => 1; my @pids; foreach ( 1 .. 10 ) { my $f = fork; if ( defined($f) and $f == 0 ) { print "-- I'm a forked process $$\n"; sleep rand 5; print "-- I'm tired, going away $$\n"; exit(0); } push @pids, $f if defined $f; } waitpids(@pids); print "--- FINISHED\n";
l8rZ,
--
andrew