File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -1025,6 +1025,30 @@ pub const RTLD_NODELETE: ::c_int = 0x80;
1025
1025
pub const RTLD_NOLOAD : :: c_int = 0x10 ;
1026
1026
pub const RTLD_GLOBAL : :: c_int = 0x8 ;
1027
1027
1028
+ pub const _WSTOPPED: :: c_int = 0o177 ;
1029
+
1030
+ f ! {
1031
+ pub fn WSTOPSIG ( status: :: c_int) -> :: c_int {
1032
+ status >> 8
1033
+ }
1034
+
1035
+ pub fn WSTATUS ( status: :: c_int) -> :: c_int {
1036
+ status & 0x7f
1037
+ }
1038
+
1039
+ pub fn WIFCONTINUED ( status: :: c_int) -> bool {
1040
+ WSTATUS ( status) == _WSTOPPED && WSTOPSIG ( status) == 0x13
1041
+ }
1042
+
1043
+ pub fn WIFSIGNALED ( status: :: c_int) -> bool {
1044
+ WSTATUS ( status) != _WSTOPPED && WSTATUS ( status) != 0
1045
+ }
1046
+
1047
+ pub fn WIFSTOPPED ( status: :: c_int) -> bool {
1048
+ WSTATUS ( status) == _WSTOPPED && WSTOPSIG ( status) != 0x13
1049
+ }
1050
+ }
1051
+
1028
1052
extern {
1029
1053
pub fn getnameinfo ( sa : * const :: sockaddr ,
1030
1054
salen : :: socklen_t ,
Original file line number Diff line number Diff line change @@ -330,6 +330,11 @@ f! {
330
330
pub fn WTERMSIG ( status: :: c_int) -> :: c_int {
331
331
status & 0o177
332
332
}
333
+
334
+ pub fn WCOREDUMP ( status: :: c_int) -> bool {
335
+ ( status & 0o200 ) != 0
336
+ }
337
+
333
338
}
334
339
335
340
extern {
You can’t perform that action at this time.
0 commit comments