Reset SIGCHLD to default
Tomas Doran [Tue, 27 Sep 2011 13:40:37 +0000 (14:40 +0100)]
ChangeLog
lib/FCGI/ProcManager.pm

index 0c47a95..cfd5438 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
 0.23
     * Fix pm_wait routine to exit without a warning
     * Fix pm_wait to correctly detect child processes which have died.
+    * Fix to return SIGCHLD handler to it's default state in the
+      pm_manage loop so that loading code which sets SIGCHLD to ignore
+      won't interfear with normal operation.
 
 0.22 2011-08-04 Tomas Doran  <bobtfish@bobtfish.net>
     * Ship a version of FCGI::ProcManager::Constrainted which actually
index e1cc8be..0bff7cf 100644 (file)
@@ -181,6 +181,9 @@ sub pm_manage {
   my ($this,%values) = self_or_default(@_);
   map { $this->pm_parameter($_,$values{$_}) } keys %values;
 
+  local $SIG{CHLD}; # Replace the SIGCHLD default handler in case
+                    # somebody shit on it whilst loading code.
+
   # skip to handling now if we won't be managing any processes.
   $this->n_processes() or return;