From: Tomas Doran Date: Tue, 27 Sep 2011 13:40:37 +0000 (+0100) Subject: Reset SIGCHLD to default X-Git-Tag: 0.23~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FFCGI-ProcManager.git;a=commitdiff_plain;h=f969c0660ebbf43a72456197871e6a18fc430c31 Reset SIGCHLD to default --- diff --git a/ChangeLog b/ChangeLog index 0c47a95..cfd5438 100644 --- 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 * Ship a version of FCGI::ProcManager::Constrainted which actually diff --git a/lib/FCGI/ProcManager.pm b/lib/FCGI/ProcManager.pm index e1cc8be..0bff7cf 100644 --- a/lib/FCGI/ProcManager.pm +++ b/lib/FCGI/ProcManager.pm @@ -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;