-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dettach duplicated signal handler from workers #2413
Conversation
Fri Sep 11 16:31:26 UTC 2020 impatient try |
Fri Sep 11 16:31:29 UTC 2020 impatient try |
/test integration |
Fri Sep 11 16:34:31 UTC 2020 impatient try |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cliveseldon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thu Sep 17 09:10:06 UTC 2020 impatient try |
Thu Sep 17 09:10:09 UTC 2020 impatient try |
Thu Sep 17 12:58:45 UTC 2020 impatient try |
Thu Sep 17 12:58:54 UTC 2020 impatient try |
What this PR does / why we need it:
Add a
post_worker_init
hook to dettach a signal handler from the Gunicorn worker processes to avoid callingjoin()
when they exit. That signal handler is attached bymultiprocessing
on the root process, but gets inherited by the child workers because of howfork()
works.More details can be found in the following issue: benoitc/gunicorn#1391
Which issue(s) this PR fixes:
Fixes #2094
Special notes for your reviewer:
The signal handler should still remain on the root process.
Does this PR introduce a user-facing change?: