@@ -64,14 +64,6 @@ impl WaitState {
64
64
}
65
65
}
66
66
67
- /// A copy of the Unix `WIFEXITED(status)` macro.
68
- #[ allow( non_snake_case) ]
69
- #[ inline]
70
- #[ must_use]
71
- const fn WSTOPSIG ( status : i32 ) -> i32 {
72
- ( status >> 8 ) & 0xFF
73
- }
74
-
75
67
/// Represents the stopped status bit.
76
68
const _WSTOPPED: i32 = 0x7F ;
77
69
@@ -165,19 +157,6 @@ impl WaitState {
165
157
Self :: WTERMSIG ( status) as u8
166
158
}
167
159
168
- /// Returns the signal number that caused the process to stop.
169
- ///
170
- /// Equivalent to the Unix `WSTOPSIG(status)` macro.
171
- ///
172
- /// # Panics
173
- ///
174
- /// If [`is_w_stopped`](Self::is_w_stopped) returns `false`, this function will panic.
175
- #[ allow( clippy:: cast_possible_truncation, clippy:: cast_sign_loss) ]
176
- #[ must_use]
177
- pub const fn w_stop_sig ( status : i32 ) -> u8 {
178
- Self :: WSTOPSIG ( status) as u8
179
- }
180
-
181
160
/// Returns `true` if the status indicates a core dump occurred.
182
161
///
183
162
/// Equivalent to the Unix `WCOREDUMP(status)` macro.
@@ -287,7 +266,7 @@ mod tests {
287
266
#[ cfg( all( test, unix) ) ]
288
267
mod libc_verification_tests {
289
268
use super :: * ;
290
- use libc:: { WCOREDUMP , WEXITSTATUS , WIFEXITED , WIFSIGNALED , WSTOPSIG , WTERMSIG } ;
269
+ use libc:: { WCOREDUMP , WEXITSTATUS , WIFEXITED , WIFSIGNALED , WTERMSIG } ;
291
270
292
271
#[ test]
293
272
fn test_wifexited_true ( ) {
@@ -331,12 +310,6 @@ mod libc_verification_tests {
331
310
assert_eq ! ( WaitState :: w_term_sig( 0x0000_0001 ) , 1 ) ;
332
311
}
333
312
334
- #[ test]
335
- fn test_wstopsig ( ) {
336
- assert_eq ! ( WaitState :: w_stop_sig( 0x0000_007F ) , 0 ) ;
337
- assert_eq ! ( WSTOPSIG ( 0x0000_007F ) , 0 ) ;
338
- }
339
-
340
313
#[ test]
341
314
fn test_wcoredump_true ( ) {
342
315
assert ! ( WCOREDUMP ( 0x0000_0081 ) ) ;
0 commit comments