]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-126688: Reinit import lock after fork (GH-126692) (GH-126765)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 12 Nov 2024 22:00:42 +0000 (23:00 +0100)
committerGitHub <noreply@github.com>
Tue, 12 Nov 2024 22:00:42 +0000 (22:00 +0000)
commit13fe8f946e60f28a7ae3b1e540973986f4eb357c
tree118191b3fb7646cee0a4fcc6f62183979ab06471
parent3dab1cebf7d306e01eb21b773891e7e69ed28688
[3.13] gh-126688: Reinit import lock after fork (GH-126692) (GH-126765)

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().
(cherry picked from commit 5610860840aa71b186fc5639211dd268b817d65f)

Co-authored-by: Sam Gross <colesbury@gmail.com>
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