-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add RawFD
constructors as an alternative to fd
#55028
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sensible to me. Would it make sense to backport this to 1.11 (then the docstring of course needs to be adjusted)
|
|
Removing the "merge me" label because the CI failures seem like they may be related to the contents of the PR. |
@whomever, feel free to re-open if you want to see this through. I'm going to close because I no longer think it's necessary. |
This provides an alternative to
fd
for getting the raw file descriptor of a File or IOStream. This is important becausefd
returns anInt
which is a poor choice of return type in the presence ofBase.RawFD
. I copped most of the docstring and implementation fromfd
.This allows folks to write
RawFD(::File)
instead ofRawFD(fd(::File)::Int)
, and eventually may enable us to deprecatefd
.See also: #51710