Message297163
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`. |
|
Date |
User |
Action |
Args |
2017-06-28 08:56:08 | louielu | set | recipients:
+ louielu, terry.reedy, njs, martin.panter, Mark, eryksun |
2017-06-28 08:56:08 | louielu | set | messageid: <1498640168.57.0.772655382839.issue29926@psf.upfronthosting.co.za> |
2017-06-28 08:56:08 | louielu | link | issue29926 messages |
2017-06-28 08:56:08 | louielu | create | |
|