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 {
12
12
pub fn read ( & self , data : & mut [ u8 ] ) -> io:: Result < usize > {
13
13
let fd = FileDesc :: new ( libc:: STDIN_FILENO ) ;
14
14
let ret = fd. read ( data) ;
15
- fd. into_raw ( ) ;
15
+ fd. into_raw ( ) ; // do not close this FD
16
16
ret
17
17
}
18
18
}
@@ -23,7 +23,7 @@ impl Stdout {
23
23
pub fn write ( & self , data : & [ u8 ] ) -> io:: Result < usize > {
24
24
let fd = FileDesc :: new ( libc:: STDOUT_FILENO ) ;
25
25
let ret = fd. write ( data) ;
26
- fd. into_raw ( ) ;
26
+ fd. into_raw ( ) ; // do not close this FD
27
27
ret
28
28
}
29
29
@@ -38,7 +38,7 @@ impl Stderr {
38
38
pub fn write ( & self , data : & [ u8 ] ) -> io:: Result < usize > {
39
39
let fd = FileDesc :: new ( libc:: STDERR_FILENO ) ;
40
40
let ret = fd. write ( data) ;
41
- fd. into_raw ( ) ;
41
+ fd. into_raw ( ) ; // do not close this FD
42
42
ret
43
43
}
44
44
You can’t perform that action at this time.
0 commit comments