Fix problem on windows with dd
This commit is contained in:
parent
b22c07aba2
commit
f6eb2d6e54
|
@ -1,5 +1,5 @@
|
||||||
/// This file is meant to house (OS specific) implementations on how to kill processes.
|
/// This file is meant to house (OS specific) implementations on how to kill processes.
|
||||||
use crate::utils::error::{BottomError, Result};
|
use crate::utils::error::BottomError;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
// Copied from SO: https://stackoverflow.com/a/55231715
|
// Copied from SO: https://stackoverflow.com/a/55231715
|
||||||
|
@ -32,7 +32,7 @@ impl Process {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Kills a process, given a PID.
|
/// Kills a process, given a PID.
|
||||||
pub fn kill_process_given_pid(pid: u32) -> Result<()> {
|
pub fn kill_process_given_pid(pid: u32) -> crate::utils::error::Result<()> {
|
||||||
if cfg!(target_os = "linux") {
|
if cfg!(target_os = "linux") {
|
||||||
// Linux
|
// Linux
|
||||||
Command::new("kill").arg(pid.to_string()).output()?;
|
Command::new("kill").arg(pid.to_string()).output()?;
|
||||||
|
|
Loading…
Reference in New Issue