diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-26 14:40:36 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-26 14:44:22 +0300 |
| commit | 9eec3029e13b791b8a4954e38d5bb7db6e2ff68f (patch) | |
| tree | 83825b0a824dc3cd0d951140064feec457a38174 /src/detect.rs | |
| parent | 62b9795771b22e36b1464c235745990eaa8921e6 (diff) | |
fix: reduce idle agent checker CPU
refs #300
Diffstat (limited to 'src/detect.rs')
| -rw-r--r-- | src/detect.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/detect.rs b/src/detect.rs index 32b7a6cd..500d6eb3 100644 --- a/src/detect.rs +++ b/src/detect.rs @@ -997,6 +997,14 @@ pub fn foreground_job(child_pid: u32) -> Option<crate::platform::ForegroundJob> crate::platform::foreground_job(child_pid) } +/// Get the foreground process group leader as a one-process job. +/// This is cheaper than collecting every process in the foreground job. +pub fn foreground_group_leader_job( + process_group_id: u32, +) -> Option<crate::platform::ForegroundJob> { + crate::platform::foreground_group_leader_job(process_group_id) +} + /// Get the foreground process group for a pane shell PID. /// This is cheaper than collecting every process in the foreground job. pub fn foreground_process_group_id(child_pid: u32) -> Option<u32> { |
