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/platform/macos.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/platform/macos.rs') diff --git a/src/platform/macos.rs b/src/platform/macos.rs index f5de67ce..43c24386 100644 --- a/src/platform/macos.rs +++ b/src/platform/macos.rs @@ -12,7 +12,7 @@ pub fn foreground_job(child_pid: u32) -> Option { return None; } - let fg_pgid = foreground_pgid(child_pid)?; + let fg_pgid = foreground_process_group_id(child_pid)?; let mut pids = vec![0i32; 4096]; let bytes = unsafe { libc::proc_listallpids( @@ -62,7 +62,7 @@ pub fn foreground_job(child_pid: u32) -> Option { /// Read `e_tpgid` (foreground process group of the controlling terminal) /// for the given PID. -fn foreground_pgid(pid: u32) -> Option { +pub fn foreground_process_group_id(pid: u32) -> Option { let mut info: libc::proc_bsdinfo = unsafe { std::mem::zeroed() }; let size = std::mem::size_of::() as libc::c_int; -- cgit v1.2.3