mirror of
https://github.com/python/cpython.git
synced 2025-08-29 13:15:11 +00:00
Test atexit shutdown mechanism in a subprocess (#4828)
* Test atexit shutdown mechanism in a subprocess
This commit is contained in:
parent
317def9fdb
commit
fc5db95e00
2 changed files with 18 additions and 0 deletions
|
@ -2086,6 +2086,8 @@ _Py_FatalInitError(_PyInitError err)
|
|||
/* For the atexit module. */
|
||||
void _Py_PyAtExit(void (*func)(void))
|
||||
{
|
||||
/* Guard against API misuse (see bpo-17852) */
|
||||
assert(_PyRuntime.pyexitfunc == NULL || _PyRuntime.pyexitfunc == func);
|
||||
_PyRuntime.pyexitfunc = func;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue