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

make File::try_clone produce non-inheritable handles on Windows #65316

Merged
merged 1 commit into from
Oct 17, 2019

Commits on Oct 11, 2019

  1. make File::try_clone produce non-inheritable handles on Windows

    File handles shouldn't be inheritable in general.
    `std::process::Command` takes care of making them inheritable when child
    processes are spawned, and the `CREATE_PROCESS_LOCK` protects against
    races in that section on Windows. But `File::try_clone` has been
    creating inheritable file descriptors outside of that lock, which could
    be leaking into other child processes unintentionally.
    
    See also rust-lang#31069 (comment).
    oconnor663 committed Oct 11, 2019
    Configuration menu
    Copy the full SHA
    93ae692 View commit details
    Browse the repository at this point in the history