blob: 8768d9d32782c471539bbc466c5973d20e38f43f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
--- pueue_lib/src/process_helper/freebsd.rs.orig 2022-12-25 20:28:22 UTC
+++ 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<i32> {
+ /// TODO
+ return { };
+ }
+}
|