mirror of https://github.com/python/cpython.git
M PyShell.py
M rpc.py Improve exception handing if peer process has terminated.
This commit is contained in:
parent
98b15ab980
commit
9ac783d723
|
@ -400,7 +400,10 @@ def __signal_interrupt(self):
|
|||
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", (), {})
|
||||
|
|
|
@ -166,6 +166,8 @@ def localcall(self, request):
|
|||
return ("OK", ret)
|
||||
except SystemExit:
|
||||
raise
|
||||
except socket.error:
|
||||
pass
|
||||
except:
|
||||
self.debug("localcall:EXCEPTION")
|
||||
traceback.print_exc(file=sys.__stderr__)
|
||||
|
|
Loading…
Reference in New Issue