aboutsummaryrefslogtreecommitdiff
path: root/src/detect.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/detect.rs')
-rw-r--r--src/detect.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/detect.rs b/src/detect.rs
index d6d48343..ce06211c 100644
--- a/src/detect.rs
+++ b/src/detect.rs
@@ -589,6 +589,12 @@ pub fn foreground_job(child_pid: u32) -> Option<crate::platform::ForegroundJob>
crate::platform::foreground_job(child_pid)
}
+/// 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> {
+ crate::platform::foreground_process_group_id(child_pid)
+}
+
fn normalized_process_name(process: &crate::platform::ForegroundProcess) -> String {
let effective = process.argv0.as_deref().unwrap_or(&process.name);
let lower_effective = effective.to_lowercase();