in reply to forking in a cgi script

i think this should get rid of your zombies for you
use POSIX ":sys_wait_h"; sub zombie_reaper { while ( waitpid( -1, WNOHANG ) > 0 ) { } $SIG{CHLD} = \&zombie_reaper; } $SIG{CHLD} = \&zombie_reaper;

Replies are listed 'Best First'.
Re: Re: forking in a cgi script
by Marcello (Hermit) on Mar 26, 2004 at 10:12 UTC
    Or even:
    # Automatically reap zombies $SIG{CHLD} = 'IGNORE';
    Marcel