mirror of
https://github.com/uutils/coreutils.git
synced 2025-12-23 08:47:37 +00:00
Multi platform mechanism for getting error message from libc
This commit is contained in:
parent
647821684e
commit
dd8b3090d2
1 changed files with 1 additions and 2 deletions
|
|
@ -72,8 +72,7 @@ pub fn pid_is_alive(pid: i32) -> bool {
|
|||
if pid <= 0 {
|
||||
return true;
|
||||
}
|
||||
|
||||
unsafe { libc::kill(pid, 0) == 0 || *libc::__errno_location() != libc::ESRCH }
|
||||
unsafe { libc::kill(pid, 0) == 0 || Errno::last() != Errno::ESRCH }
|
||||
}
|
||||
|
||||
/// `getsid()` returns the session ID of the process with process ID pid.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue