From: Kurt B. Kaiser Date: Wed, 19 Jan 2005 06:23:51 +0000 (+0000) Subject: On OpenBSD, terminating IDLE with ctrl-c from the command line caused a X-Git-Tag: v2.3.5c1~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37e132bb42611a8bb7b9c3106f2cf5a4cd690c30;p=thirdparty%2FPython%2Fcpython.git 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 --- diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 05ea5a9447f0..63d144b7743d 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 767741acd062..b79cea968c77 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):