Eryk Sun added the comment:

The strong claim that "interrupt_main is now equivalent to the user having hit 
control-C" is the reason I suggested broadcasting CTRL_C_EVENT via 
GenerateConsoleCtrlEvent. That operation isn't buggy on its own to my 
knowledge. There is a glitch due to the CRT. If a non-console process calls 
AllocConsole or AttachConsole, its list of registered handlers gets reset to 
the default handler that calls ExitProcess, and the CRT provides no way to set 
its handler again. 

I mentioned the possibility of calling CancelSynchronousIo in order to cancel a 
console read like Ctrl+C does (but clunkier) -- again, because of the 
equivalence claim. ERROR_OPERATION_ABORTED would need to be handled like EINTR 
on Unix. This would entail small changes to a lot of code, so it does need a 
separate issue if there's any support for this idea.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29926>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to