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

Fix hang on TTY read #192

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

Commits on May 24, 2024

  1. Fix hang on TTY read

    In some cases, when a underlying error happens to a TTY port between poll::wait_read_fd and unistd::read, the read function would hang waiting for some data that is never received.
    
    This commit sets the port to non-canonical mode, with VMIN = VTIME = 0. With this change, it has the effect of making reads non-blocking, returning right away.
    
    The timeout behaviour is maintained, as prior to reading we call unix::poll through poll::wait_read_fd.
    
    Fixes: serialport#7
    danielstuart14 committed May 24, 2024
    Configuration menu
    Copy the full SHA
    8961365 View commit details
    Browse the repository at this point in the history