summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClementTsang <cjhtsang@uwaterloo.ca>2020-01-30 23:13:12 -0500
committerClementTsang <cjhtsang@uwaterloo.ca>2020-01-30 23:13:12 -0500
commit24f0bbc8522d462c10675d3b2d2e3a599e0a52f7 (patch)
treeff6c51c30f7d67fe5997925d42657431834711cd /src
parenteea1d29da851f4735c4d67b373273d9f5ccf4b2e (diff)
dd works on macOS now.
Diffstat (limited to 'src')
-rw-r--r--src/app/process_killer.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/app/process_killer.rs b/src/app/process_killer.rs
index 9f1d8656..d0f374ac 100644
--- a/src/app/process_killer.rs
+++ b/src/app/process_killer.rs
@@ -33,7 +33,7 @@ impl Process {
/// Kills a process, given a PID.
pub fn kill_process_given_pid(pid: u32) -> crate::utils::error::Result<()> {
- if cfg!(target_os = "linux") {
+ if cfg!(target_os = "linux") || cfg!(target_os = "macos") {
Command::new("kill").arg(pid.to_string()).output()?;
} else if cfg!(target_os = "windows") {
#[cfg(target_os = "windows")]
@@ -41,11 +41,6 @@ pub fn kill_process_given_pid(pid: u32) -> crate::utils::error::Result<()> {
let process = Process::open(pid as DWORD)?;
process.kill()?;
}
- } else if cfg!(target_os = "macos") {
- // TODO: macOS
- return Err(BottomError::GenericError {
- message: "Sorry, macOS support is not implemented yet!".to_string(),
- });
} else {
return Err(BottomError::GenericError {
message: