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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fredrik at dolda2000 dot com
New email:
PHP Version: OS:

 

 [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: Wed Nov 14 11:01:25 2018 UTC