Fix pm_wait
Tomas Doran [Tue, 27 Sep 2011 13:30:25 +0000 (14:30 +0100)]
ChangeLog
lib/FCGI/ProcManager.pm

index 10c41fe..0c47a95 100644 (file)
--- 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  <bobtfish@bobtfish.net>
     * Ship a version of FCGI::ProcManager::Constrainted which actually
       works as advertised.
index bd4dab8..e1cc8be 100644 (file)
@@ -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