Skip to content

Commit cefc364

Browse files
fix(tests): restore SIGINT handler in keyboard-interrupt fill child
Background non-interactive shells inherit SIGINT as SIG_IGN, so the re-armed interrupt from a fill never becomes KeyboardInterrupt. Fixes #3213
1 parent 590a8bf commit cefc364

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎cuda_core/tests/test_driver_table.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,14 @@ def test_missing_table_entry_names_the_mismatch(tmp_path):
169169

170170

171171
_INTERRUPTED_CHILD = textwrap.dedent("""
172+
import signal
172173
import warnings
173174
import cuda.bindings._internal.nvrtc as loader
174175
176+
# Non-interactive background shells inherit SIGINT as SIG_IGN; restore the
177+
# default handler so a re-armed interrupt becomes KeyboardInterrupt.
178+
signal.signal(signal.SIGINT, signal.default_int_handler)
179+
175180
real_inspect = loader._inspect_function_pointers
176181
177182
def interrupting_inspect():

0 commit comments

Comments
 (0)