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

x11: dup fd before passing to shm_attach_fd #170

Merged
merged 1 commit into from
Oct 31, 2023
Merged

x11: dup fd before passing to shm_attach_fd #170

merged 1 commit into from
Oct 31, 2023

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Oct 30, 2023

This function takes Into<RawFdContainer>. So it accepts an owned fd, and closes it. So as long as the API is like this, we need to dup a new fd it can close when calling it.

Into<RawFdContainer> is implemented for anything implementing IntoRawFd, so passing OwnedFd works.

Fixes #168. Should be backported to 0.3.x.

This function takes `Into<RawFdContainer>`. So it accepts an owned fd,
and closes it. So as long as the API is like this, we need to dup a new
fd it can close when calling it.

`Into<RawFdContainer>` is implemented for anything implementing `IntoRawFd`,
so passing `OwnedFd` works.

Fixes #168. Should be
backported to 0.3.x.
@ids1024 ids1024 requested a review from notgull as a code owner October 30, 2023 15:53
@notgull notgull merged commit 3b98da7 into master Oct 31, 2023
39 checks passed
@notgull notgull deleted the dup-fd branch October 31, 2023 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Crash with large windows on x11
2 participants