-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File descriptors created by Rust should be automatically close-on-exec #23233
Comments
The symptoms here are a bit of a red herring, if you take a look at the
We have specific code to prevent leaking file descriptors, and it is known to not be bullet proof and is being tracked. In light of this information I'm going to close this in favor of the RFC tracking issue. Thanks for the report though! |
Alex Crichton notifications@github.com writes:
Sorry for the confusion. I knew about a nasty FD leak to child |
No problem! |
The following code outputs
This means that Rust is setting the
close-on-exec
flag for the file descriptor that it created (file descriptor 3 is for the/dev/fd
directory). The newio
module should that this is also done, and that this is done atomically where possible.This is mostly a tracking issue to make sure that there is no regression.
The text was updated successfully, but these errors were encountered: