mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-01 10:11:30 +08:00
Stop orphaned processes from lingering when their parent dies. set_parent_death_signal arms Linux prctl(PR_SET_PDEATHSIG) so a process is signalled the moment its parent exits, returning False off Linux so callers fall back to polling getppid. The manager records its parent pid, arms a SIGTERM parent-death signal, and checks getppid each tick: if the arbiter dies, the manager stops its companions and exits instead of running on under a dead arbiter. Each companion arms the same parent-death signal and rechecks getppid right after the fork, exiting if the manager already died before the signal was armed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Generate Documentation
======================
Requirements
------------
To generate documentation you need to install:
- Python >= 3.7
- Sphinx (https://www.sphinx-doc.org/)
Generate html
-------------
::
$ make html
The command generates html document inside ``build/html`` dir.