platform: kill_pid spawns taskkill and kill with the hidden console (master's windows-spawn check on the reliability merge)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-07 13:18:20 +00:00
parent 77350dd832
commit fefab015e3

View file

@ -305,9 +305,9 @@ pub fn miner_processes() -> Vec<(u32, String)> {
/// Ends one process by pid (Windows: taskkill /T /F; unix: SIGKILL).
pub fn kill_pid(pid: u32) {
if cfg!(windows) {
let _ = std::process::Command::new(tool("taskkill")).args(["/PID", &pid.to_string(), "/T", "/F"]).output();
let _ = quiet(&mut std::process::Command::new(tool("taskkill"))).args(["/PID", &pid.to_string(), "/T", "/F"]).output();
} else {
let _ = std::process::Command::new("kill").args(["-9", &pid.to_string()]).output();
let _ = quiet(&mut std::process::Command::new("kill")).args(["-9", &pid.to_string()]).output();
}
}