]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-126688: Reinit import lock after fork (#126692)
authorSam Gross <colesbury@gmail.com>
Tue, 12 Nov 2024 20:53:58 +0000 (20:53 +0000)
committerGitHub <noreply@github.com>
Tue, 12 Nov 2024 20:53:58 +0000 (15:53 -0500)
commit5610860840aa71b186fc5639211dd268b817d65f
treef6a3b5ad6413f6e0091222ad2bcdf07252b4ed54
parentbf224bd7cef5d24eaff35945ebe7ffe14df7710f
gh-126688: Reinit import lock after fork (#126692)

The PyMutex implementation supports unlocking after fork because we
clear the list of waiters in parking_lot.c. This doesn't work as well
for _PyRecursiveMutex because on some systems, such as SerenityOS, the
thread id is not preserved across fork().
Include/internal/pycore_import.h
Misc/NEWS.d/next/Core_and_Builtins/2024-11-11-17-02-48.gh-issue-126688.QiOXUi.rst [new file with mode: 0644]
Modules/posixmodule.c
Python/import.c