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

refactor: impl EventFd::read/write with eventfd_read/write #2261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SteveLauC
Copy link
Member

What does this PR do

Implement EventFd::read/write with libc::eventfd_read()/eventfd_write() functions instead of implementing them ourselves so that we can survive even when libc has its behavior changed

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

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.

LGTM. A quick online search showed that these functions have been available in Ubuntu since at least 16.04, and in Android since at least 2008.

@SteveLauC
Copy link
Member Author

A quick online search showed that these functions have been available in Ubuntu since at least 16.04, and in Android since at least 2008.

Well, then I am not sure if we should merge this since I don't want to be in trouble like the one of #2146, let's me investigate the Glibc version where they were added.

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.

None yet

2 participants