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

backend: Handle EINTR, partial writes when using sendmsg #647

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

Commits on Aug 10, 2023

  1. backend: Handle EINTR, partial writes when using sendmsg

    Correct use of `sendmsg`/`write`, or any such call needs to handle
    `EINTR`, and partial writes. Even if this may be rare. `wl_connection_flush`
    in libwayland handles these things.
    
    A couple things still seem wrong:
    * If there's a limit to how many fds can be send in one message, that
      needs to be handled. I don't know if POSIX defines that anywhere.
    * Using a `Vec<u32>` for the buffer here may be problematic. What if a
      partial write writes a number of bytes that isn't a multiple of 4?
      There is in general no guarantee that won't happen.
    ids1024 committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    b9a0ef7 View commit details
    Browse the repository at this point in the history