aboutsummaryrefslogtreecommitdiff
path: root/src/platform/macos.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-06 20:17:52 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-06 20:17:52 +0300
commit94b90043f98499a1ed3594dd9ea42b2aef62b93a (patch)
tree2f19157650b5010d91d815ee4afd4d54d2519fe2 /src/platform/macos.rs
parentf7b0ee2f758440db3a3ff4cc727f879b420255d7 (diff)
fix: clear native agent detection after shell returns
fixes #66
Diffstat (limited to 'src/platform/macos.rs')
-rw-r--r--src/platform/macos.rs4
1 files changed, 2 insertions, 2 deletions
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<ForegroundJob> {
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<ForegroundJob> {
/// Read `e_tpgid` (foreground process group of the controlling terminal)
/// for the given PID.
-fn foreground_pgid(pid: u32) -> Option<u32> {
+pub fn foreground_process_group_id(pid: u32) -> Option<u32> {
let mut info: libc::proc_bsdinfo = unsafe { std::mem::zeroed() };
let size = std::mem::size_of::<libc::proc_bsdinfo>() as libc::c_int;