Skip to content
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 method to retreive file descriptor from PollFd #1286

Closed
wants to merge 1 commit into from

Conversation

IntrepidPig
Copy link

This fixes #1146.

@IntrepidPig
Copy link
Author

Oops, I just noticed this is a duplicate of #1147. Sorry about that.

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding a bespoke fd method, how about you implement AsRawFd instead? Several of Nix's types already do that.

cemeyer added a commit to cemeyer/nix that referenced this pull request Sep 7, 2021
Implement the trait on PollFd, providing an `as_raw_fd()` accessor to
get the RawFd associated with the PollFd.

Subsumes nix-rust#1147, nix-rust#1286.  Closes nix-rust#1146.

Test: `cargo test --test test test_pollfd_fd`
bors bot added a commit that referenced this pull request Sep 7, 2021
1516: Implement AsRawFd for PollFd r=asomers a=cemeyer

Implement the trait on PollFd, providing an `as_raw_fd()` accessor to
get the RawFd associated with the PollFd.

Subsumes #1147, #1286.  Closes #1146.

Test: `cargo test --test test test_pollfd_fd`

Co-authored-by: Conrad Meyer <cem@FreeBSD.org>
@SteveLauC
Copy link
Member

Thanks for your contributing!

That issue has already been fixed, so I am gonna close this PR, I am sorry about this.

@SteveLauC SteveLauC closed this Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose RawFd in impl PollFd
3 participants