# Install signal handler for child processes $SIG{'CHLD'} = sub { while (waitpid(-1,WNOHANG) > 0) {} };