diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2003-03-10 20:42:24 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2003-03-10 20:42:24 (GMT) |
commit | 9ac783d723bda15a34218ebb2037b60e521c3248 (patch) | |
tree | 90c00d06522d740106c201522f851e3ac085cce0 /Lib/idlelib/PyShell.py | |
parent | 98b15ab980aacc317779ce1f9af8da135981b01b (diff) | |
download | cpython-9ac783d723bda15a34218ebb2037b60e521c3248.zip cpython-9ac783d723bda15a34218ebb2037b60e521c3248.tar.gz cpython-9ac783d723bda15a34218ebb2037b60e521c3248.tar.bz2 |
M PyShell.py
M rpc.py
Improve exception handing if peer process has terminated.
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r-- | Lib/idlelib/PyShell.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 946e0b2..0c9fbfb 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -400,7 +400,10 @@ class ModifiedInterpreter(InteractiveInterpreter): from signal import SIGINT except ImportError: SIGINT = 2 - os.kill(self.rpcpid, SIGINT) + try: + os.kill(self.rpcpid, SIGINT) + except OSError: # subprocess may have already exited + pass def __request_interrupt(self): self.rpcclt.asynccall("exec", "interrupt_the_server", (), {}) |