File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ pub trait ExitStatusExt {
175
175
/// Ie, if `WIFSIGNALED`, this returns `WTERMSIG`.
176
176
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
177
177
fn signal ( & self ) -> Option < i32 > ;
178
+
179
+ /// Returns the underlying raw `wait` status.
180
+ #[ unstable( feature = "unix_process_wait_more" , issue = "none" ) ]
181
+ fn into_raw ( self ) -> i32 ;
178
182
}
179
183
180
184
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -186,6 +190,10 @@ impl ExitStatusExt for process::ExitStatus {
186
190
fn signal ( & self ) -> Option < i32 > {
187
191
self . as_inner ( ) . signal ( )
188
192
}
193
+
194
+ fn into_raw ( self ) -> i32 {
195
+ self . as_inner ( ) . into_raw ( ) . into ( )
196
+ }
189
197
}
190
198
191
199
#[ stable( feature = "process_extensions" , since = "1.2.0" ) ]
Original file line number Diff line number Diff line change @@ -481,6 +481,10 @@ impl ExitStatus {
481
481
pub fn signal ( & self ) -> Option < i32 > {
482
482
if libc:: WIFSIGNALED ( self . 0 ) { Some ( libc:: WTERMSIG ( self . 0 ) ) } else { None }
483
483
}
484
+
485
+ pub fn into_raw ( & self ) -> c_int {
486
+ self . 0
487
+ }
484
488
}
485
489
486
490
/// Converts a raw `c_int` to a type-safe `ExitStatus` by wrapping it without copying.
You can’t perform that action at this time.
0 commit comments