[Python-Dev] Default SIGINT handling dangerous?
Guido van Rossum
guido at python.org
Sat Dec 14 17:31:26 CET 2013
Your subject should probably have mentioned Windows. SIGINT handling
on UNIX is well-behaved. Yes, you can interrupt a finally clause, but
this by itself doesn't threaten the integrity of the interpreter and
the standard data types.
On Windows, "signal" handling is some feeble emulation done by the C
library wrappers and all bets are, as you've discovered, off. My own
experience is the opposite of yours -- I often end up with
uninterruptable runaway code that can only be stopped by ctrl-BRK,
which takes e.g. Powershell with it. :-(
That said, I'd be fine with a command-line flag to skip the default
SIGINT handler setup.
--
--Guido van Rossum (python.org/~guido)
More information about the Python-Dev
mailing list