M PyShell.py
M rpc.py
Improve exception handing if peer process has terminated.
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 @@
             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", (), {})