We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d48ca3 commit 91b1724Copy full SHA for 91b1724
src/uucore/src/lib/features/process.rs
@@ -72,8 +72,7 @@ pub fn pid_is_alive(pid: i32) -> bool {
72
if pid <= 0 {
73
return true;
74
}
75
-
76
- unsafe { libc::kill(pid, 0) == 0 || *libc::__errno_location() != libc::ESRCH }
+ unsafe { libc::kill(pid, 0) == 0 || Errno::last() != Errno::ESRCH }
77
78
79
/// `getsid()` returns the session ID of the process with process ID pid.
0 commit comments