Skip to content

Commit 8a8edfe

Browse files
authored
Merge pull request #1785 from JohnTitor/wifsignaled
FreeBSD: Follow upstream `WIFSIGNALED` change
2 parents 401ba79 + 42393b7 commit 8a8edfe

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,10 @@ f! {
10511051
(_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) +
10521052
_CMSG_ALIGN(length as usize)) as ::c_uint
10531053
}
1054+
1055+
pub fn WIFSIGNALED(status: ::c_int) -> bool {
1056+
(status & 0o177) != 0o177 && (status & 0o177) != 0
1057+
}
10541058
}
10551059

10561060
extern "C" {

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,10 @@ f! {
11611161
::mem::size_of::<sockcred>() + ::mem::size_of::<::gid_t>() * ngrps
11621162
}
11631163

1164+
pub fn WIFSIGNALED(status: ::c_int) -> bool {
1165+
(status & 0o177) != 0o177 && (status & 0o177) != 0 && status != 0x13
1166+
}
1167+
11641168
pub fn uname(buf: *mut ::utsname) -> ::c_int {
11651169
__xuname(256, buf as *mut ::c_void)
11661170
}

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,10 +1194,6 @@ f! {
11941194
status >> 8
11951195
}
11961196

1197-
pub fn WIFSIGNALED(status: ::c_int) -> bool {
1198-
(status & 0o177) != 0o177 && (status & 0o177) != 0
1199-
}
1200-
12011197
pub fn WIFSTOPPED(status: ::c_int) -> bool {
12021198
(status & 0o177) == 0o177
12031199
}

0 commit comments

Comments
 (0)