]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-139894: fix incorrect sharing of current task while forking in `asyncio...
authorKumar Aditya <kumaraditya@python.org>
Fri, 10 Oct 2025 17:06:02 +0000 (22:36 +0530)
committerGitHub <noreply@github.com>
Fri, 10 Oct 2025 17:06:02 +0000 (22:36 +0530)
commit72f25a8d9a5673d39c107cf522465a566b979ed5
tree23c80421fb55619e94ec4f3404709ea30b03a7e3
parent60d15e1717f31aecce93042929f7e177b31726bc
[3.14] gh-139894: fix incorrect sharing of current task while forking in `asyncio` (GH-139897) (#139913)

* [3.14] gh-139894: fix incorrect sharing of current task while forking in `asyncio`  (GH-139897)

Fix incorrect sharing of current task with the forked child process by clearing thread state's current task and current loop in `PyOS_AfterFork_Child`.
(cherry picked from commit b881df47ff1adca515d1de04f689160ddae72142)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* Update Lib/test/test_asyncio/test_unix_events.py
Lib/test/test_asyncio/test_unix_events.py
Misc/NEWS.d/next/Library/2025-10-10-11-22-50.gh-issue-139894.ECAXqj.rst [new file with mode: 0644]
Modules/posixmodule.c