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 {
175175 /// Ie, if `WIFSIGNALED`, this returns `WTERMSIG`.
176176 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
177177 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 ;
178182}
179183
180184#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -186,6 +190,10 @@ impl ExitStatusExt for process::ExitStatus {
186190 fn signal ( & self ) -> Option < i32 > {
187191 self . as_inner ( ) . signal ( )
188192 }
193+
194+ fn into_raw ( self ) -> i32 {
195+ self . as_inner ( ) . into_raw ( ) . into ( )
196+ }
189197}
190198
191199#[ stable( feature = "process_extensions" , since = "1.2.0" ) ]
Original file line number Diff line number Diff line change @@ -481,6 +481,10 @@ impl ExitStatus {
481481 pub fn signal ( & self ) -> Option < i32 > {
482482 if libc:: WIFSIGNALED ( self . 0 ) { Some ( libc:: WTERMSIG ( self . 0 ) ) } else { None }
483483 }
484+
485+ pub fn into_raw ( & self ) -> c_int {
486+ self . 0
487+ }
484488}
485489
486490/// 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