-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Expose file descriptor #19116
Expose file descriptor #19116
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon. |
I suspect that maybe of much use for network code (like mio) as well. Could you also expose fd() on sockets? |
It's doable with |
There are plans to make the contents of Currently just reexporting the I know @aturon has many thoughts on this, but it may be best to hold off until we have a stronger vision for the |
Replace Inner::fd from fd_t to FileDesc.
For FFI needs, as started by #15643, this allow
File
,PipeStream
andUnixStream
to export their internal file descriptor with theAsFileDesc
trait provided by #18557.