]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-115035: Mark ThreadHandles as non-joinable earlier after forking (#115042)
authorSam Gross <colesbury@gmail.com>
Tue, 6 Feb 2024 19:45:04 +0000 (14:45 -0500)
committerGitHub <noreply@github.com>
Tue, 6 Feb 2024 19:45:04 +0000 (14:45 -0500)
commitb6228b521b4692b2de1c1c12f4aa5623f8319084
treea173751e1e7882a755bf6d2b75e38ac833430fd6
parent71239d50b54c90afd3fdde260848e0c6d73a5c27
gh-115035: Mark ThreadHandles as non-joinable earlier after forking (#115042)

This marks dead ThreadHandles as non-joinable earlier in
`PyOS_AfterFork_Child()` before we execute any Python code. The handles
are stored in a global linked list in `_PyRuntimeState` because `fork()`
affects the entire process.
Include/internal/pycore_pythread.h
Include/internal/pycore_runtime_init.h
Lib/threading.py
Modules/_threadmodule.c
Python/pystate.c
Python/thread_nt.h
Python/thread_pthread.h