File tree 1 file changed +14
-0
lines changed
library/std/src/sys/windows
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ pub struct Command {
170
170
171
171
pub enum Stdio {
172
172
Inherit ,
173
+ InheritSpecific { from_stdio_id : c:: DWORD } ,
173
174
Null ,
174
175
MakePipe ,
175
176
Pipe ( AnonPipe ) ,
@@ -533,6 +534,7 @@ impl Stdio {
533
534
} ;
534
535
match * self {
535
536
Stdio :: Inherit => use_stdio_id ( stdio_id) ,
537
+ Stdio :: InheritSpecific { from_stdio_id } => use_stdio_id ( from_stdio_id) ,
536
538
537
539
Stdio :: MakePipe => {
538
540
let ours_readable = stdio_id != c:: STD_INPUT_HANDLE ;
@@ -580,6 +582,18 @@ impl From<File> for Stdio {
580
582
}
581
583
}
582
584
585
+ impl From < io:: Stdout > for Stdio {
586
+ fn from ( _: io:: Stdout ) -> Stdio {
587
+ Stdio :: InheritSpecific { from_stdio_id : c:: STD_OUTPUT_HANDLE }
588
+ }
589
+ }
590
+
591
+ impl From < io:: Stderr > for Stdio {
592
+ fn from ( _: io:: Stderr ) -> Stdio {
593
+ Stdio :: InheritSpecific { from_stdio_id : c:: STD_ERROR_HANDLE }
594
+ }
595
+ }
596
+
583
597
////////////////////////////////////////////////////////////////////////////////
584
598
// Processes
585
599
////////////////////////////////////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments