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
Test atexit shutdown mechanism in a subprocess #4828
Conversation
…t_check_subprocess
Python/pylifecycle.c
Outdated
| @@ -2086,6 +2086,8 @@ _Py_FatalInitError(_PyInitError err) | |||
| /* For the atexit module. */ | |||
| void _Py_PyAtExit(void (*func)(void)) | |||
| { | |||
| /* Guard against API misuse */ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add "bpo-17852: " prefix. Otherwise, the purpose of the assertion is not obvious.
Or explain that calling this function to register a new callback replaces the previous callback, which is unlikely to be the expected behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, adding a bpo references sounds good to me.
|
At least, the assertion worked as expected before you rebased this PR on top of PR #4826, Travis CI failed with: |
|
Thanks @pitrou for the PR |
|
Sorry, @pitrou, I could not cleanly backport this to |
* Test atexit shutdown mechanism in a subprocess. (cherry picked from commit fc5db95)
|
GH-4829 is a backport of this pull request to the 3.6 branch. |


Needs #4826 to work.