-
Notifications
You must be signed in to change notification settings - Fork 676
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
Taking RawFd by value is not sound #594
Comments
Do you know if this concern has been raised within stdlib before? I think |
More likely we should introduce a nix-specific wrapper that enforces safe usage. This needs a bit of thought! |
I was thinking exactly like this.
|
Related to #678 |
Raised by @lucab on #562
This is a problem. A
RawFd
value may be kept long enough to end up referring to a different file. We may wish to provide a non-copy wrapper type similar tomio
'sEventedFd
that allows enforcing the borrowing relationship. From the docs:The text was updated successfully, but these errors were encountered: