aboutsummaryrefslogtreecommitdiff
path: root/src/detect.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/detect.rs')
-rw-r--r--src/detect.rs8
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> {