rust/library/std/src/os/windows
Dylan DPC fe55eee9a5
Rollup merge of #93263 - sunfishcode:sunfishcode/detatched-console-handle, r=dtolnay
Consistently present absent stdio handles on Windows as NULL handles.

This addresses #90964 by making the std API consistent about presenting
absent stdio handles on Windows as NULL handles. Stdio handles may be
absent due to `#![windows_subsystem = "windows"]`, due to the console
being detached, or due to a child process having been launched from a
parent where stdio handles are absent.

Specifically, this fixes the case of child processes of parents with absent
stdio, which previously ended up with `stdin().as_raw_handle()` returning
`INVALID_HANDLE_VALUE`, which was surprising, and which overlapped with an
unrelated valid handle value. With this patch, `stdin().as_raw_handle()`
now returns null in these situation, which is consistent with what it
does in the parent process.

And, document this in the "Windows Portability Considerations" sections of
the relevant documentation.
2022-03-19 02:02:01 +01:00
..
io Fix a compilation error. 2022-03-04 05:09:40 -08:00
ffi.rs modify std::os docs to be more consistent 2021-09-17 23:23:21 +05:30
fs.rs Add #![allow(unexpected_cfgs)] in preparation of global --check-cfg 2022-03-04 11:34:51 +01:00
mod.rs modify std::os docs to be more consistent 2021-09-17 23:23:21 +05:30
process.rs modify std::os docs to be more consistent 2021-09-17 23:23:21 +05:30
raw.rs Suppress some cfg from being shown in the stdlib docs 2021-10-05 18:15:29 +02:00
thread.rs modify std::os docs to be more consistent 2021-09-17 23:23:21 +05:30