[Python-ideas] IDEA: do not alter default SIGINT handling
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Sep 14 03:15:58 CEST 2009
Steven D'Aprano wrote:
> I think it's worth considering what the OP's real complaint is: namely,
> that (some? all?) C extensions can't be interrupted by ctrl-C as the
> user would expect. Is that a valid issue, or is it expected that Python
> has no control over what happens inside the C extension?
I think it's an unavoidable consequence of the desire
to be able to unwind cleanly in the event of a Ctrl-C.
If it happens in the middle of arbitrary C code, you
can't just jump out of it because that could leave things
in an unpredictable state, and execution of further
Python code wouldn't be safe.
--
Greg
More information about the Python-ideas
mailing list