MCPcopy Create free account
hub / github.com/comaps/comaps / kill

Method kill

tools/python/test_server/server/SiblingKiller.py:76–90  ·  view source on GitHub ↗
(self, pid=0, pids=[])

Source from the content-addressed store, hash-verified

74
75
76 def kill(self, pid=0, pids=[]):
77 if not pid and not pids:
78 logging.debug("There are no siblings to kill")
79 return
80 if pid and pids:
81 raise Exception("Use either one pid or multiple pids")
82
83 hitlist = ""
84 if pid:
85 hitlist = str(pid)
86 if pids:
87 hitlist = " ".join(map(str, pids))
88
89 command = f"kill -9 {hitlist}"
90 self.exec_command(command)
91
92
93 def siblings(self):

Callers 2

kill_siblingsMethod · 0.95
kill_process_on_portMethod · 0.95

Calls 3

exec_commandMethod · 0.95
mapFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected