File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
library/std/src/sys/windows Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ pub struct Command {
170170
171171pub enum Stdio {
172172 Inherit ,
173+ InheritSpecific { from_stdio_id : c:: DWORD } ,
173174 Null ,
174175 MakePipe ,
175176 Pipe ( AnonPipe ) ,
@@ -533,6 +534,7 @@ impl Stdio {
533534 } ;
534535 match * self {
535536 Stdio :: Inherit => use_stdio_id ( stdio_id) ,
537+ Stdio :: InheritSpecific { from_stdio_id } => use_stdio_id ( from_stdio_id) ,
536538
537539 Stdio :: MakePipe => {
538540 let ours_readable = stdio_id != c:: STD_INPUT_HANDLE ;
@@ -580,6 +582,18 @@ impl From<File> for Stdio {
580582 }
581583}
582584
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+
583597////////////////////////////////////////////////////////////////////////////////
584598// Processes
585599////////////////////////////////////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments