File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ impl Stdin {
1212 pub fn read ( & self , data : & mut [ u8 ] ) -> io:: Result < usize > {
1313 let fd = FileDesc :: new ( libc:: STDIN_FILENO ) ;
1414 let ret = fd. read ( data) ;
15- fd. into_raw ( ) ;
15+ fd. into_raw ( ) ; // do not close this FD
1616 ret
1717 }
1818}
@@ -23,7 +23,7 @@ impl Stdout {
2323 pub fn write ( & self , data : & [ u8 ] ) -> io:: Result < usize > {
2424 let fd = FileDesc :: new ( libc:: STDOUT_FILENO ) ;
2525 let ret = fd. write ( data) ;
26- fd. into_raw ( ) ;
26+ fd. into_raw ( ) ; // do not close this FD
2727 ret
2828 }
2929
@@ -38,7 +38,7 @@ impl Stderr {
3838 pub fn write ( & self , data : & [ u8 ] ) -> io:: Result < usize > {
3939 let fd = FileDesc :: new ( libc:: STDERR_FILENO ) ;
4040 let ret = fd. write ( data) ;
41- fd. into_raw ( ) ;
41+ fd. into_raw ( ) ; // do not close this FD
4242 ret
4343 }
4444
You can’t perform that action at this time.
0 commit comments