mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
M PyShell.py
M rpc.py Improve exception handing if peer process has terminated.
This commit is contained in:
parent
98b15ab980
commit
9ac783d723
2 changed files with 6 additions and 1 deletions
|
@ -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", (), {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue