1
0
mirror of https://github.com/nukesor/pueue synced 2024-07-01 07:04:26 +00:00

Add FreeBSD process helper support

This commit is contained in:
Ryan Steinmetz 2024-05-13 18:56:55 -04:00
parent 4805fc7418
commit 60e130eb88
No known key found for this signature in database
GPG Key ID: 1EF8BA6BD02846D7
2 changed files with 16 additions and 0 deletions

View 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 { };
}
}

View File

@ -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::*;