mirror of
https://github.com/python/cpython.git
synced 2025-08-28 20:56:54 +00:00
On OpenBSD, terminating IDLE with ctrl-c from the command line caused a
stuck subprocess MainThread because only the SocketThread was exiting. M NEWS.txt M idlever.py M run.py
This commit is contained in:
parent
bae8f377d3
commit
e953511858
3 changed files with 12 additions and 2 deletions
|
@ -215,6 +215,7 @@ class MyRPCServer(rpc.RPCServer):
|
|||
Interrupt the MainThread and exit server if link is dropped.
|
||||
|
||||
"""
|
||||
global quitting
|
||||
try:
|
||||
raise
|
||||
except SystemExit:
|
||||
|
@ -233,7 +234,8 @@ class MyRPCServer(rpc.RPCServer):
|
|||
traceback.print_exc(file=erf)
|
||||
print>>erf, '\n*** Unrecoverable, server exiting!'
|
||||
print>>erf, '-'*40
|
||||
exit()
|
||||
quitting = True
|
||||
thread.interrupt_main()
|
||||
|
||||
|
||||
class MyHandler(rpc.RPCHandler):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue