SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

72153 0 0 Python

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