mirror of
https://github.com/python/cpython
synced 2026-09-28 03:33:18 +03:00
bpo-16500: Allow registering at-fork handlers (#1715)
* bpo-16500: Allow registering at-fork handlers * Address Serhiy's comments * Add doc for new C API * Add doc for new Python-facing function * Add NEWS entry + doc nit
This commit is contained in:
parent
f931fd1c2a
commit
346cbd351e
15 changed files with 365 additions and 68 deletions
|
|
@ -7,10 +7,17 @@ extern "C" {
|
|||
|
||||
PyAPI_FUNC(int) PyOS_InterruptOccurred(void);
|
||||
PyAPI_FUNC(void) PyOS_InitInterrupts(void);
|
||||
PyAPI_FUNC(void) PyOS_AfterFork(void);
|
||||
#ifdef HAVE_FORK
|
||||
PyAPI_FUNC(void) PyOS_BeforeFork(void);
|
||||
PyAPI_FUNC(void) PyOS_AfterFork_Parent(void);
|
||||
PyAPI_FUNC(void) PyOS_AfterFork_Child(void);
|
||||
#endif
|
||||
/* Deprecated, please use PyOS_AfterFork_Child() instead */
|
||||
PyAPI_FUNC(void) PyOS_AfterFork(void) Py_DEPRECATED(3.7);
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
PyAPI_FUNC(int) _PyOS_IsMainThread(void);
|
||||
PyAPI_FUNC(void) _PySignal_AfterFork(void);
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
/* windows.h is not included by Python.h so use void* instead of HANDLE */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue