php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68229 FastCGI process management doesn't work if SIGCHLD is inherited as SIG_INT
Submitted: 2014-10-15 01:16 UTC Modified: -
From: fredrik at dolda2000 dot com Assigned:
Status: Open Package: CGI/CLI related
PHP Version: master-Git-2014-10-15 (Git) OS: Any POSIX
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-10-15 01:16 UTC] fredrik at dolda2000 dot com
Description:
------------
If PHP is started in FastCGI mode managing several child workers, and the SIGCHLD handler is inherited as SIG_IGN from the parent process, the wait() loop doesn't work as intended, since wait() does not report auto-reaped children.

Instead, it will start looping indefinitely once all children have exited, since wait() will start returning ECHILD before exit_signal has been set, eating CPU until killed.

Inheriting SIGCHLD as SIG_IGN may arguably be a rare condition, but it probably doesn't hurt to reset it to SIG_DFL, since PHP does depend on it for proper behavior.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC