>Hi all, >I'm using fork() and waitpid(0 and am having trouble reaping my dead children when processing a CGI. I can run similar >code from the command line and it works fine... but for some reason, when the CGI is processing... the first child is >reaped... but all subsequent children just run forever... here's the code snippet:
I fixed a similar problem on Win32 by including the following line toward the top of my scripts :
$SIG{CHLD} = "IGNORE";
I have had to do this on both Windows and Linux (the script runs as a Daemon on Linux or a Service on Windows 2003 Server). The original problem program was a listener that services multiple connections (cross platform). On Linux (actually Solaris) the symptoms were a bunch of zombie processes that eventually exhaust the process table. On Windows the service I wrote would eventually crash. Hope it helps,
Hope this helps,
-M
|
_______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs