File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -205,11 +205,7 @@ pub trait StdChildWrapper: Any + std::fmt::Debug + Send {
205
205
/// and unwrapped processes.
206
206
#[ cfg( unix) ]
207
207
fn signal ( & self , sig : i32 ) -> Result < ( ) > {
208
- kill (
209
- Pid :: from_raw ( i32:: try_from ( self . id ( ) ) . map_err ( std:: io:: Error :: other) ?) ,
210
- Signal :: try_from ( sig) ?,
211
- )
212
- . map_err ( std:: io:: Error :: from)
208
+ self . inner ( ) . signal ( sig)
213
209
}
214
210
}
215
211
@@ -240,6 +236,23 @@ impl StdChildWrapper for StdChild {
240
236
fn stderr ( & mut self ) -> & mut Option < ChildStderr > {
241
237
& mut self . 0 . stderr
242
238
}
239
+ fn id ( & self ) -> u32 {
240
+ self . 0 . id ( )
241
+ }
242
+ fn try_wait ( & mut self ) -> Result < Option < ExitStatus > > {
243
+ self . 0 . try_wait ( )
244
+ }
245
+ fn wait ( & mut self ) -> Result < ExitStatus > {
246
+ self . 0 . wait ( )
247
+ }
248
+ #[ cfg( unix) ]
249
+ fn signal ( & self , sig : i32 ) -> Result < ( ) > {
250
+ kill (
251
+ Pid :: from_raw ( i32:: try_from ( self . id ( ) ) . map_err ( std:: io:: Error :: other) ?) ,
252
+ Signal :: try_from ( sig) ?,
253
+ )
254
+ . map_err ( std:: io:: Error :: from)
255
+ }
243
256
}
244
257
245
258
impl dyn StdChildWrapper {
You can’t perform that action at this time.
0 commit comments