Skip to content

Commit 83b3730

Browse files
authored
Merge pull request #1859 from joshtriplett/w_exitcode
2 parents b232c9b + 57298d0 commit 83b3730

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/unix/linux_like/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,14 @@ f! {
12611261
(status & 0x80) != 0
12621262
}
12631263

1264+
pub fn W_EXITCODE(ret: ::c_int, sig: ::c_int) -> ::c_int {
1265+
(ret << 8) | sig
1266+
}
1267+
1268+
pub fn W_STOPCODE(sig: ::c_int) -> ::c_int {
1269+
(sig << 8) | 0x7f
1270+
}
1271+
12641272
pub fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int {
12651273
(cmd << 8) | (type_ & 0x00ff)
12661274
}

0 commit comments

Comments
 (0)