diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2004-11-19 15:46:49 +0000 |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2004-11-19 15:46:49 +0000 |
commit | e953511858365619e953f12f88326272c20cd6f1 (patch) | |
tree | e9dda5724dbacdbb041f5ab5b9a6c27bf6a62e15 /Lib/idlelib/run.py | |
parent | bae8f377d30ae352d82aa93cab4ca137ede7b930 (diff) | |
download | cpython-e953511858365619e953f12f88326272c20cd6f1.tar.gz cpython-e953511858365619e953f12f88326272c20cd6f1.zip |
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
Diffstat (limited to 'Lib/idlelib/run.py')
-rw-r--r-- | Lib/idlelib/run.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 98b8c13030e..90a46922c6e 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -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): |