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

Backport fix about close-on-exec to v0.7.x #1495

Merged
merged 1 commit into from
Jun 11, 2021

Conversation

Tim-Zhang
Copy link
Contributor

@Tim-Zhang Tim-Zhang commented Jun 11, 2021

Backport #1491

The close-on-exec flag (FD_CLOEXEC; see fcntl(2)) for the duplicate descriptor is off
and we should set it manually.

Fixes: tokio-rs/tokio#3809

Signed-off-by: Tim Zhang tim@hyper.sh

The close-on-exec flag (FD_CLOEXEC; see fcntl(2)) for the duplicate descriptor is off
and we should set it manually.

Fixes: tokio-rs/tokio#3809

Signed-off-by: Tim Zhang <tim@hyper.sh>
@Thomasdezeeuw Thomasdezeeuw merged commit d1617b5 into tokio-rs:v0.7.x Jun 11, 2021
@Thomasdezeeuw
Copy link
Collaborator

Thanks @Tim-Zhang.

@Tim-Zhang Tim-Zhang deleted the fix-epoll-try-clone-0.7.x branch June 11, 2021 10:58
@@ -41,7 +41,7 @@ impl Selector {
}

pub fn try_clone(&self) -> io::Result<Selector> {
syscall!(dup(self.ep)).map(|ep| Selector {
syscall!(fcntl(self.ep, libc::F_DUPFD_CLOEXEC)).map(|ep| Selector {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I should have caught this reviewing this previously but, @Tim-Zhang you need to pass a third argument to fcntlhere. It's fixed in 2883f5c and #1498.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry for the mistake, I saw you have fixed this, thanks

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