|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: fredrik at dolda2000 dot com
New email:
PHP Version: OS:


 [2014-10-15 01:16 UTC] fredrik at dolda2000 dot com
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.


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Sep 30 17:01:24 2023 UTC