-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Implement AsRawFd and FromRawFd for ReadDir #56777
Comments
So we would need to find a workaround for this, such as defining a method that takes the path instead of implementing (Note that |
We could try recovering the path by doing a readlink on In addition to |
With I/O safety being stabilized this issue should also include implementing |
I don't think we can provide |
Most unixes provide
dirfd()
, which can be used to get a file descriptor fromstruct DIR *
.The two errors are
EINVAL
(dirfd
called on invalid pointer), which can't occur in correct code, andENOTSUP
(not supported by implementation), which doesn't occur on most implementations.Most unixes also provide
fdopendir()
, which opens a file descriptor asstruct DIR *
. It fails if the file descriptor is invalid or if it fails to allocate memory.The text was updated successfully, but these errors were encountered: