diff options
author | Sam Gross <colesbury@gmail.com> | 2025-02-13 12:29:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-13 12:29:03 -0500 |
commit | 451f291baaff918228ace4e8257be42737d7654a (patch) | |
tree | 0824f1f7ab3b13a292bf1c4a9a01b13c63915e2a /Python/pystrhex.c | |
parent | aa284232013693103431fb672a0bcabac3d4200b (diff) | |
download | cpython-451f291baaff918228ace4e8257be42737d7654a.tar.gz cpython-451f291baaff918228ace4e8257be42737d7654a.zip |
gh-128130: Fix unhandled keyboard interrupt data race (gh-129975)
Use an atomic operation when setting
`_PyRuntime.signals.unhandled_keyboard_interrupt`. We now only clear the
variable at the start of `_PyRun_Main`, which is the same function where
we check it.
This avoids race conditions where previously another thread might call
`run_eval_code_obj()` and erroneously clear the unhandled keyboard
interrupt.
Diffstat (limited to 'Python/pystrhex.c')
0 files changed, 0 insertions, 0 deletions