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

unix: restore tty attributes on handle close #4399

Open
wants to merge 1 commit into
base: v1.x
Choose a base branch
from

Commits on May 7, 2024

  1. unix: restore tty attributes on handle close

    Libuv stores the `struct termios` for use inside uv_tty_reset_mode().
    
    Node.js uses said function to restore the tty to its original mode
    on SIGINT or SIGTERM, when there is no opportunity to shut down the
    process normally.
    
    Track uv_tty_t handle closing, otherwise we might be trying to use a
    stale termios.
    
    The current solution is not ideal because there can be multiple handles
    that refer to the same tty/pty and, for various reasons, we can't really
    determine when we close the last handle. The last handle may not even be
    inside the current process.
    
    Still, all things considered, it's probably (hopefully!) an improvement
    over the status quo.
    
    Refs: libuv#4398
    bnoordhuis committed May 7, 2024
    Configuration menu
    Copy the full SHA
    2c6241e View commit details
    Browse the repository at this point in the history