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

Method kill_subprocess

Lib/idlelib/pyshell.py:534–547  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

532 threading.Thread(target=self.__request_interrupt).start()
533
534 def kill_subprocess(self):
535 if self._afterid is not None:
536 self.tkconsole.text.after_cancel(self._afterid)
537 try:
538 self.rpcclt.listening_sock.close()
539 except AttributeError: # no socket
540 pass
541 try:
542 self.rpcclt.close()
543 except AttributeError: # no socket
544 pass
545 self.terminate_subprocess()
546 self.tkconsole.executing = False
547 self.rpcclt = None
548
549 def terminate_subprocess(self):
550 "Make sure subprocess is terminated"

Callers 1

_closeMethod · 0.80

Calls 3

terminate_subprocessMethod · 0.95
after_cancelMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected