summaryrefslogtreecommitdiffstats
path: root/Include/internal
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2018-09-14 21:17:20 (GMT)
committerGitHub <noreply@github.com>2018-09-14 21:17:20 (GMT)
commit5903296045b586b9cd1fce0b1e02caf896028d1d (patch)
tree99e8900633096060e931980d52e063c044870d3c /Include/internal
parent3faaa8857a42a36383bb18425444e597fc876797 (diff)
downloadcpython-5903296045b586b9cd1fce0b1e02caf896028d1d.zip
cpython-5903296045b586b9cd1fce0b1e02caf896028d1d.tar.gz
cpython-5903296045b586b9cd1fce0b1e02caf896028d1d.tar.bz2
bpo-34651: Only allow the main interpreter to fork. (gh-9279)
When os.fork() is called (on platforms that support it) all threads but the current one are destroyed in the child process. Consequently we must ensure that all but the associated interpreter are likewise destroyed. The main interpreter is critical for runtime operation, so we must ensure that fork only happens in the main interpreter. https://bugs.python.org/issue34651
Diffstat (limited to 'Include/internal')
-rw-r--r--Include/internal/pystate.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/internal/pystate.h b/Include/internal/pystate.h
index ef83af5..c93dda2 100644
--- a/Include/internal/pystate.h
+++ b/Include/internal/pystate.h
@@ -218,6 +218,7 @@ PyAPI_FUNC(_PyInitError) _PyRuntime_Initialize(void);
/* Other */
PyAPI_FUNC(_PyInitError) _PyInterpreterState_Enable(_PyRuntimeState *);
+PyAPI_FUNC(void) _PyInterpreterState_DeleteExceptMain(void);
#ifdef __cplusplus
}