FreeBSD: Follow upstream `WIFSIGNALED` change

This commit is contained in:
Yuki Okushi 2020-05-29 04:27:57 +09:00
parent 401ba798a5
commit 42393b7d38
No known key found for this signature in database
GPG Key ID: B0986C85C0E2DAA1
3 changed files with 8 additions and 4 deletions

View File

@ -1051,6 +1051,10 @@ f! {
(_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) +
_CMSG_ALIGN(length as usize)) as ::c_uint
}
pub fn WIFSIGNALED(status: ::c_int) -> bool {
(status & 0o177) != 0o177 && (status & 0o177) != 0
}
}
extern "C" {

View File

@ -1161,6 +1161,10 @@ f! {
::mem::size_of::<sockcred>() + ::mem::size_of::<::gid_t>() * ngrps
}
pub fn WIFSIGNALED(status: ::c_int) -> bool {
(status & 0o177) != 0o177 && (status & 0o177) != 0 && status != 0x13
}
pub fn uname(buf: *mut ::utsname) -> ::c_int {
__xuname(256, buf as *mut ::c_void)
}

View File

@ -1194,10 +1194,6 @@ f! {
status >> 8
}
pub fn WIFSIGNALED(status: ::c_int) -> bool {
(status & 0o177) != 0o177 && (status & 0o177) != 0
}
pub fn WIFSTOPPED(status: ::c_int) -> bool {
(status & 0o177) == 0o177
}