Skip Menu |

This queue is for tickets about the Net-Server CPAN distribution.

Report information
The Basics
Id: 65891
Status: resolved
Priority: 0/
Queue: Net-Server

People
Owner: Nobody in particular
Requestors: quanah.gibsonmount [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.95
  • 0.96
  • 0.97
  • 0.99
Fixed in: (no value)



Subject: Correctly reap children processes
From the amavisd-new user list: --- Net/Server/PreFork.pm~ 2010-07-08 21:13:47.000000000 +0200 +++ PreFork.pm 2011-01-04 18:48:54.103050023 +0100 @@ -331,4 +331,13 @@ ); + ### reclaim process exit status from any terminated child process + ### inherited from a previous incarnation whose SIGCHLD signal was + ### ignored during a blind period between a restart and the moment + ### when the SIGCHLD handler was established just now + while ( defined(my $chld = waitpid(-1, WNOHANG)) ){ + last unless $chld > 0; + $self->{reaped_children}->{$chld} = 1; + } + ### loop on reading info from the children while( 1 ){ --- Net/Server/PreForkSimple.pm~ 2010-05-05 05:01:58.000000000 +0200 +++ Net/Server/PreForkSimple.pm 2011-01-04 18:40:23.631629852 +0100 @@ -332,4 +332,13 @@ ); + ### reclaim process exit status from any terminated child process + ### inherited from a previous incarnation whose SIGCHLD signal was + ### ignored during a blind period between a restart and the moment + ### when the SIGCHLD handler was established just now + while ( defined(my $chld = waitpid(-1, WNOHANG)) ){ + last unless $chld > 0; + $self->delete_child($chld); + } + ### loop forever while( 1 ){
Thankyou for the code. And sorry it took so long for the update. This code with some variation is now in the 2.000 release.