std: Unconditionally close all file descriptors
The logic for only closing file descriptors >= 3 was inherited from quite some time ago and ends up meaning that some internal APIs are less consistent than they should be. By unconditionally closing everything entering a `FileDesc` we ensure that we're consistent in our behavior as well as robustly handling the stdio case.
This commit is contained in:
parent
33a2191d0b
commit
eadc3bcd67
5 changed files with 86 additions and 67 deletions
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// ignore-windows
|
||||
// ignore-android
|
||||
|
||||
#![feature(libc)]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue