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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC