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(posix): ensure nonblocking file descriptor is nonblocking (#10080) #10303

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on May 31, 2024

  1. fix(posix): use fcntl to check if a fd is nonblocking (oven-sh#10080)

    The FileReader is responsible for deciding what sort of file descriptor
    has been passed to it. On MacOS, when stdin is provided to it the
    FileReader assumes that it is nonblocking even if the descriptor is not
    as it passes the pollable and not a tty check, this then results in
    hangs as the reader expects `EAGAIN`.
    
    To fix this we now check the file descriptor to see if it is nonblocking
    rather than using assumptions.
    alexkornitzer authored and Alex Kornitzer committed May 31, 2024
    Configuration menu
    Copy the full SHA
    337df1b View commit details
    Browse the repository at this point in the history
  2. tweak: don't allow isNonBlocking on Windows

    Ensure that this function is not called on Windows as it is not
    supported being a POSIX only function.
    alexkornitzer authored and Alex Kornitzer committed May 31, 2024
    Configuration menu
    Copy the full SHA
    be1e636 View commit details
    Browse the repository at this point in the history