(pid)
| 51 | |
| 52 | |
| 53 | def force_kill(pid): |
| 54 | if not pid: |
| 55 | return |
| 56 | if os.name == "nt": |
| 57 | subprocess.run(["taskkill", "/F", "/PID", str(pid)], capture_output=True, timeout=30) |
| 58 | else: |
| 59 | subprocess.run(["kill", "-9", str(pid)], capture_output=True, timeout=30) |
| 60 | |
| 61 | |
| 62 | def main(): |