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

fs: unset FileHandle fd after close #31389

Closed
wants to merge 1 commit into from

Commits on Jan 16, 2020

  1. fs: unset FileHandle fd after close

    - Do not set the fd as a property on the native object.
    - Use the already-existent `GetFD()` method to pass the
      fd from C++ to JS.
    - Cache the fd in JS to avoid repeated accesses to the
      C++ getter.
    - Set the fd to `-1` after close, thus reliably making
      subsequent calls using the `FileHandle` return `EBADF`.
    
    Fixes: nodejs#31361
    addaleax committed Jan 16, 2020
    Configuration menu
    Copy the full SHA
    707d6fc View commit details
    Browse the repository at this point in the history