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:
parent
77350dd832
commit
fefab015e3
1 changed files with 2 additions and 2 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue