Skip to content

[3.13] gh-126688: Reinit import lock after fork (GH-126692) - #126765

Merged
colesbury merged 1 commit into
python:3.13from
miss-islington:backport-5610860-3.13
Nov 12, 2024
Merged

colesbury merged 1 commit into
python:3.13from
miss-islington:backport-5610860-3.13

Conversation

@miss-islington

@miss-islington miss-islington commented Nov 12, 2024 •

Copy link
Copy Markdown
Contributor

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 5610860)

Co-authored-by: Sam Gross colesbury@gmail.com

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 5610860)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@colesbury
colesbury enabled auto-merge (squash) November 12, 2024 21:38
@colesbury
colesbury merged commit 13fe8f9 into python:3.13 Nov 12, 2024
oskar-skog added a commit to oskar-skog/serenity that referenced this pull request Nov 12, 2024
nico pushed a commit to SerenityOS/serenity that referenced this pull request Nov 13, 2024
python/cpython#126765

Closes #25263

Make sure to revert this commit before updating Python.
@miss-islington
miss-islington deleted the backport-5610860-3.13 branch January 2, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants