(self, pid=0, pids=[])
| 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): |
no test coverage detected