Author louielu
Recipients Mark, eryksun, louielu, martin.panter, njs, terry.reedy
Date 2017-06-28.08:56:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1498640168.57.0.772655382839.issue29926@psf.upfronthosting.co.za>
In-reply-to
Content
Based on Martin's patch, I slightly changed the logic for the patch.

So, I add a `finish` flag to detect the code in Executive.runcode is done or not. `interrupt_the_server` will first SIGINT via interrupt_main, if this doesn't work after 0.2 seconds, it will then sent the signal by pthread_kill to main_thread.

This will work on Linux, and MacOS which I tested. And it will avoid the different behavior for `input()` (which I believe is because of the GNU readline been used.) and `time.sleep()` in only using `interrupt_main` or `signal.pthread_kill`.
History
Date User Action Args
2017-06-28 08:56:08louielusetrecipients: + louielu, terry.reedy, njs, martin.panter, Mark, eryksun
2017-06-28 08:56:08louielusetmessageid: <1498640168.57.0.772655382839.issue29926@psf.upfronthosting.co.za>
2017-06-28 08:56:08louielulinkissue29926 messages
2017-06-28 08:56:08louielucreate