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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
16 - 8 = ?
Subscribe to this entry?

 
 [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-2021 The PHP Group
All rights reserved.
Last updated: Fri Mar 05 21:01:24 2021 UTC