From 94b90043f98499a1ed3594dd9ea42b2aef62b93a Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Wed, 6 May 2026 20:17:52 +0300 Subject: fix: clear native agent detection after shell returns fixes #66 --- src/detect.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/detect.rs') 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::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 { + 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(); -- cgit v1.2.3