From: Tomas Doran Date: Tue, 27 Sep 2011 13:30:25 +0000 (+0100) Subject: Fix pm_wait X-Git-Tag: 0.23~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FFCGI-ProcManager.git;a=commitdiff_plain;h=fca7461e4925c5bfe743878209b2576c6f029ed7 Fix pm_wait --- diff --git a/ChangeLog b/ChangeLog index 10c41fe..0c47a95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +0.23 + * Fix pm_wait routine to exit without a warning + * Fix pm_wait to correctly detect child processes which have died. + 0.22 2011-08-04 Tomas Doran * Ship a version of FCGI::ProcManager::Constrainted which actually works as advertised. diff --git a/lib/FCGI/ProcManager.pm b/lib/FCGI/ProcManager.pm index bd4dab8..e1cc8be 100644 --- a/lib/FCGI/ProcManager.pm +++ b/lib/FCGI/ProcManager.pm @@ -332,7 +332,7 @@ sub pm_wait { my ($this) = self_or_default(@_); # wait for the next server to die. - next if (my $pid = wait()) < 0; + return if (my $pid = wait() < 0); # notify when one of our servers have died. delete $this->{PIDS}->{$pid} and