[Python-ideas] IDEA: do not alter default SIGINT handling

Terry Reedy tjreedy at udel.edu
Mon Sep 14 16:16:58 CEST 2009

Nick Coghlan wrote:
> Mike Meyer wrote:
>> On Sun, 13 Sep 2009 21:35:56 +0000 (UTC)
>> Benjamin Peterson <benjamin at python.org> wrote:
>>> Bernie Innocenti <bernie at ...> writes:
>>>> If we could break the syntax of "print" statements, I'm sure we
>>>> can also find a satisfactory compromise for CTRL-C handling that
>>>> won't affect more than 0.1% of existing Python programs.
>>> It would actually be a huge compatibility break because finally statments would
>>> no longer be garunteed to execute.
>> They aren't now. os._exit() skips unwinding the try/except chain
>> before exiting.
> An application calling an underscore prefixed function (in the os module
> no less) is significantly different to a user pressing Ctrl-C while the
> application is running normally.
> If a user wants to kill it ungracefully, that's what Ctrl-Break is for.

I was not aware of that. Perhaps a deficiency in my Windows knowledge.
"Using Python" only mentions ctrl-d on unix and ctrl-z on windows.
Perhaps more could be added.

More information about the Python-ideas mailing list