about summary refs log tree commit diff
path: root/library/std/src/os/windows
AgeCommit message (Collapse)AuthorLines
2021-10-05Suppress some cfg from being shown in the stdlib docsWim Looman-0/+2
2021-09-17modify std::os docs to be more consistentSachin Cherian-4/+27
> add intra doc links > add a usage example for the os::windows module
2021-09-09Fix Windows compilation errors.Dan Gohman-11/+6
2021-09-09Fix another Windows compilation error.Dan Gohman-1/+1
2021-09-09Fix more Windows compilation errors.Dan Gohman-5/+16
2021-09-09Fix assertion failures in `OwnedHandle` with `windows_subsystem`.Dan Gohman-40/+72
As discussed in #88576, raw handle values in Windows can be null, such as in `windows_subsystem` mode, or when consoles are detached from a process. So, don't use `NonNull` to hold them, don't assert that they're not null, and remove `OwnedHandle`'s `repr(transparent)`. Introduce a new `HandleOrNull` type, similar to `HandleOrInvalid`, to cover the FFI use case.
2021-09-09Fix Windows compilation errors.Dan Gohman-3/+11
2021-09-09Add a `try_clone()` function to `OwnedFd`.Dan Gohman-0/+87
As suggested in #88564. This adds a `try_clone()` to `OwnedFd` by refactoring the code out of the existing `File`/`Socket` code.
2021-09-04Document when to use Windows' `symlink_dir` vs. `symlink_file`Chris Denton-2/+20
It was previously unclear which should be used when.
2021-08-22Fix typos “a”→“an”Frank Steffahn-1/+1
2021-08-19Fix doc test failures on Windows.Dan Gohman-1/+2
2021-08-19Factor out a common `RawFd`/`AsRawFd`/etc for Unix and WASI.Dan Gohman-5/+7
2021-08-19Add I/O safety trait impls for process::Stdio and process::Child.Dan Gohman-1/+25
2021-08-19Rename OptionFileHandle to HandleOrInvalid and make it just wrap an ↵Dan Gohman-80/+38
Option<OwnedHandle> The name (and updated documentation) make the FFI-only usage clearer, and wrapping Option<OwnedHandle> avoids the need to write a separate Drop or Debug impl. Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2021-08-19Don't encourage migration until io_safety is stablized.Dan Gohman-4/+4
2021-08-19Add more comments about the `INVALID_HANDLE_VALUE` situation.Dan Gohman-12/+30
2021-08-19Add Safety comments to the `As*` for `Owned*` implementations.Dan Gohman-0/+6
2021-08-19Add Owned*, Borrowed*, and As* to the preludes.Dan Gohman-2/+5
2021-08-19Rename `OwnedFd`'s private field to match it's debug output.Dan Gohman-51/+52
2021-08-19Delete a spurious empty comment line.Dan Gohman-1/+0
2021-08-19Add a comment about how `OwnedHandle` should not be used with registry handles.Dan Gohman-2/+15
2021-08-19Add a comment about `OptionFileHandle`.Dan Gohman-0/+4
2021-08-19Update library/std/src/os/windows/io/socket.rsDan Gohman-1/+1
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2021-08-19Update library/std/src/os/windows/io/handle.rsDan Gohman-1/+1
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2021-08-19I/O safety.Dan Gohman-23/+684
Introduce `OwnedFd` and `BorrowedFd`, and the `AsFd` trait, and implementations of `AsFd`, `From<OwnedFd>` and `From<T> for OwnedFd` for relevant types, along with Windows counterparts for handles and sockets. Tracking issue: - <https://github.com/rust-lang/rust/issues/87074> RFC: - <https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md>
2021-07-09Use AsRef in CommandExt for raw_argKornel-3/+3
2021-07-09Unescaped command-line arguments for WindowsKornel-0/+13
Fixes #29494
2021-05-03Move `std::sys::windows::ext` to `std::os::windows`Christiaan Dirkx-0/+1143