diff --git a/pueue_lib/src/process_helper/freebsd.rs b/pueue_lib/src/process_helper/freebsd.rs new file mode 100644 index 0000000..8b6ac53 --- /dev/null +++ b/pueue_lib/src/process_helper/freebsd.rs @@ -0,0 +1,15 @@ +use std::path::Path; + +/// Check, whether a specific process is exists or not +pub fn process_exists(pid: u32) -> bool { + return Path::new(&format!("/proc/{}", pid)).is_dir(); +} + +#[cfg(test)] +pub mod tests { + /// Get all processes in a process group + pub fn get_process_group_pids(pgrp: i32) -> Vec { + /// TODO + return { }; + } +} diff --git a/pueue_lib/src/process_helper/mod.rs b/pueue_lib/src/process_helper/mod.rs index 208ff41..624ec5b 100644 --- a/pueue_lib/src/process_helper/mod.rs +++ b/pueue_lib/src/process_helper/mod.rs @@ -21,6 +21,7 @@ use command_group::Signal; #[cfg_attr(target_os = "linux", path = "linux.rs")] #[cfg_attr(target_vendor = "apple", path = "apple.rs")] #[cfg_attr(target_os = "windows", path = "windows.rs")] +#[cfg_attr(target_os = "freebsd", path = "freebsd.rs")] mod platform; pub use self::platform::*;