in reply to CHLD signal?

lhoward is right, and I think this is mentioned in Advanced Perl Programming. Try to keep all SIG handlers as small as possible, or else you will start getting weird core dumps. Here is the sig function I commonly use. You should be able to do very simple stuff in the while loop, and it should handle mutiple children dying at the same time.
use POSIX; %SIG{'CHLD'} = \&REAPER; #signal routine to wait for all children (prevents zombies) sub REAPER { #WNOHANG means to return immediately if no child has exited. while ((waitpid(-1, WNOHANG)) >0 ) { } #reset the sig for the next child to die; $SIG{CHLD} = \&REAPER; }
Perhaps if you can share a bit of your code we can give you some ideas.