diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-06 20:17:52 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-06 20:17:52 +0300 |
| commit | 94b90043f98499a1ed3594dd9ea42b2aef62b93a (patch) | |
| tree | 2f19157650b5010d91d815ee4afd4d54d2519fe2 /src/detect.rs | |
| parent | f7b0ee2f758440db3a3ff4cc727f879b420255d7 (diff) | |
fix: clear native agent detection after shell returns
fixes #66
Diffstat (limited to 'src/detect.rs')
| -rw-r--r-- | src/detect.rs | 6 |
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(); |
