From 37e132bb42611a8bb7b9c3106f2cf5a4cd690c30 Mon Sep 17 00:00:00 2001 From: "Kurt B. Kaiser" Date: Wed, 19 Jan 2005 06:23:51 +0000 Subject: 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 run.py --- Lib/idlelib/NEWS.txt | 6 ++++-- Lib/idlelib/run.py | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 05ea5a9..63d144b 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,13 +3,15 @@ What's New in IDLE 1.0.4? *Release date: XX-Jan-2005* +- On OpenBSD, terminating IDLE with ctrl-c from the command line caused a + stuck subprocess MainThread because only the SocketThread was exiting. + - Saving a Keyset w/o making changes (by using the "Save as New Custom Key Set" button) caused IDLE to fail on restart (no new keyset was created in config-keys.cfg). Also true for Theme/highlights. Python Bug 1064535. - checking sys.platform for substring 'win' was breaking IDLE docs on Mac - (darwin). Also, Mac Safari browser requires full file:// URIs. Backport of - fix for SF 900580. + (darwin). Also, Mac Safari browser requires full file:// URIs. SF 900580. - rpc.py:SocketIO - Large modules were generating large pickles when downloaded to the execution server. The return of the OK response from the subprocess diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 767741a..b79cea9 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -196,6 +196,7 @@ class MyRPCServer(rpc.RPCServer): Interrupt the MainThread and exit server if link is dropped. """ + global quitting try: raise except SystemExit: @@ -214,7 +215,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): -- cgit v0.12