mirror of
https://github.com/nukesor/pueue
synced 2024-10-02 22:13:56 +00:00
Add FreeBSD process helper support
This commit is contained in:
parent
4805fc7418
commit
60e130eb88
15
pueue_lib/src/process_helper/freebsd.rs
Normal file
15
pueue_lib/src/process_helper/freebsd.rs
Normal file
|
@ -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<i32> {
|
||||||
|
/// TODO
|
||||||
|
return { };
|
||||||
|
}
|
||||||
|
}
|
|
@ -21,6 +21,7 @@ use command_group::Signal;
|
||||||
#[cfg_attr(target_os = "linux", path = "linux.rs")]
|
#[cfg_attr(target_os = "linux", path = "linux.rs")]
|
||||||
#[cfg_attr(target_vendor = "apple", path = "apple.rs")]
|
#[cfg_attr(target_vendor = "apple", path = "apple.rs")]
|
||||||
#[cfg_attr(target_os = "windows", path = "windows.rs")]
|
#[cfg_attr(target_os = "windows", path = "windows.rs")]
|
||||||
|
#[cfg_attr(target_os = "freebsd", path = "freebsd.rs")]
|
||||||
mod platform;
|
mod platform;
|
||||||
pub use self::platform::*;
|
pub use self::platform::*;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue