Skip to content

Commit b2c87e3

Browse files
authored
Merge pull request #1 from ramarivera/codex/fix-darwin-errno
fix(unix): avoid Linux-only errno symbol in process liveness check
2 parents 825261e + b6112bf commit b2c87e3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/api/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ fn is_process_alive(pid: u32) -> bool {
120120
return true;
121121
}
122122
// EPERM means the process exists but we can't signal it — still alive.
123-
*libc::__errno_location() == libc::EPERM
123+
std::io::Error::last_os_error().raw_os_error() == Some(libc::EPERM)
124124
}
125125
}
126126

0 commit comments

Comments
 (0)