MCPcopy Index your code
hub / github.com/bugy/script-server / kill

Method kill

src/execution/process_base.py:93–100  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

91 self._write_script_output('\n>> STOPPED BY USER\n')
92
93 def kill(self):
94 if not self.is_finished():
95 if not os_utils.is_win():
96 group_id = os.getpgid(self.get_process_id())
97 os.killpg(group_id, signal.SIGKILL)
98 self._write_script_output('\n>> KILLED\n')
99 else:
100 subprocess.Popen("taskkill /F /T /PID " + self.get_process_id())
101
102 def add_finish_listener(self, listener):
103 if self.is_finished():

Callers

nothing calls this directly

Calls 3

is_finishedMethod · 0.95
get_process_idMethod · 0.95
_write_script_outputMethod · 0.95

Tested by

no test coverage detected