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

Set FD_CLOEXEC flag on duplicated kqueue Poll #1498

Merged
merged 2 commits into from Jun 14, 2021

Conversation

Thomasdezeeuw
Copy link
Collaborator

@Thomasdezeeuw Thomasdezeeuw commented Jun 12, 2021

Fixes #1497.

Calls fcntl F_DUPFD_CLOEXEC expects two arguments; the command
(F_DUPFD_CLOEXEC) and an argument for the command. In this case an lower
bound for the resulting file descriptor. Because we didn't provide a
value it would take whatever value was left in the register from
whatever code used it before the system call.

This caused Waker::new to fail, see issue
tokio-rs#1497.
@Thomasdezeeuw Thomasdezeeuw merged commit 441367b into tokio-rs:master Jun 14, 2021
@Thomasdezeeuw Thomasdezeeuw deleted the fix-select-try_clone branch June 14, 2021 18:56
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.

F_DUPFD_CLOEXEC doesn't work on macOS 11.3 (v0.7.12)
2 participants