From b6112bfd6e953406365214178bcff2c397f9ea65 Mon Sep 17 00:00:00 2001 From: Ramiro Rivera Date: Sun, 22 Feb 2026 11:45:50 +0100 Subject: [PATCH] fix(api): use portable unix errno lookup for liveness check - replace Linux-only libc::__errno_location usage - use std::io::Error::last_os_error for EPERM detection on Unix --- src/api/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/mod.rs b/src/api/mod.rs index 24f1adf..e15cc8d 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -120,7 +120,7 @@ fn is_process_alive(pid: u32) -> bool { return true; } // EPERM means the process exists but we can't signal it — still alive. - *libc::__errno_location() == libc::EPERM + std::io::Error::last_os_error().raw_os_error() == Some(libc::EPERM) } }