(pid)
| 117 | |
| 118 | |
| 119 | def kill_pid(pid): |
| 120 | if not pid: |
| 121 | return |
| 122 | if os.name == "nt": |
| 123 | subprocess.run(["taskkill", "/F", "/PID", str(pid)], capture_output=True, timeout=30) |
| 124 | else: |
| 125 | subprocess.run(["kill", "-9", str(pid)], capture_output=True, timeout=30) |
| 126 | |
| 127 | |
| 128 | def pid_from(text): |
no test coverage detected