summaryrefslogtreecommitdiffstats
path: root/Python/fileutils.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2025-06-04 12:44:35 (GMT)
committerGitHub <noreply@github.com>2025-06-04 12:44:35 (GMT)
commitb2b9aaa93d054a3315dd3d0f5d3b1193d65be3d5 (patch)
tree2fa85972243c3c9d09a440842c8bb960e82947a5 /Python/fileutils.c
parentf5b438517d6618efa674470b3e2e2421334d2dc3 (diff)
downloadcpython-b2b9aaa93d054a3315dd3d0f5d3b1193d65be3d5.zip
cpython-b2b9aaa93d054a3315dd3d0f5d3b1193d65be3d5.tar.gz
cpython-b2b9aaa93d054a3315dd3d0f5d3b1193d65be3d5.tar.bz2
[3.14] gh-135099: Only wait on `_PyOS_SigintEvent()` in main thread (GH-135100) (GH-135116)
On Windows, the `_PyOS_SigintEvent()` event handle is used to interrupt the main thread when Ctrl-C is pressed. Previously, we also waited on the event from other threads, but ignored the result. However, this can race with interpreter shutdown because the main thread closes the handle in `_PySignal_Fini` and threads may still be running and using mutexes during interpreter shtudown. Only use `_PyOS_SigintEvent()` in the main thread in parking_lot.c, like we do in other places in the CPython codebase. (cherry picked from commit cc581f32bf5f15e9f2f89b830ec64ea25684d0cd) Co-authored-by: Sam Gross <colesbury@gmail.com>
Diffstat (limited to 'Python/fileutils.c')
0 files changed, 0 insertions, 0 deletions