This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Mark, eryksun, louielu, martin.panter, njs, pitrou, terry.reedy
Date 2017-06-30.00:05:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1498781137.91.0.715993917051.issue29926@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-06-30 00:05:38eryksunsetrecipients: + eryksun, terry.reedy, pitrou, njs, martin.panter, Mark, louielu
2017-06-30 00:05:37eryksunsetmessageid: <1498781137.91.0.715993917051.issue29926@psf.upfronthosting.co.za>
2017-06-30 00:05:37eryksunlinkissue29926 messages
2017-06-30 00:05:37eryksuncreate