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.
S
Sam Gross committed
451f291baaff918228ace4e8257be42737d7654a
Parent: aa28423
Committed by GitHub <[email protected]>
on 2/13/2025, 5:29:03 PM