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