MCPcopy Index your code
hub / github.com/python/cpython / terminate_subprocess

Method terminate_subprocess

Lib/idlelib/pyshell.py:549–560  ·  view source on GitHub ↗

Make sure subprocess is terminated

(self)

Source from the content-addressed store, hash-verified

547 self.rpcclt = None
548
549 def terminate_subprocess(self):
550 "Make sure subprocess is terminated"
551 try:
552 self.rpcsubproc.kill()
553 except OSError:
554 # process already terminated
555 return
556 else:
557 try:
558 self.rpcsubproc.wait()
559 except OSError:
560 return
561
562 def transfer_path(self, with_cwd=False):
563 if with_cwd: # Issue 13506

Callers 2

restart_subprocessMethod · 0.95
kill_subprocessMethod · 0.95

Calls 2

killMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected