about summary refs log tree commit diff
path: root/library/std/src/net/tcp.rs
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-03-19 02:02:01 +0100
committerGitHub <noreply@github.com>2022-03-19 02:02:01 +0100
commitfe55eee9a55a1019a2398d22b91bc201e3d4fb94 (patch)
tree89100d757d7f76c3fbb68b0c44e2b691196d4567 /library/std/src/net/tcp.rs
parente9f63fdf86de2a515da26bb905c1470e6363caf3 (diff)
parent7ddf41c7b10e46c231180cecbbb5e78e0dd12ff8 (diff)
downloadrust-fe55eee9a55a1019a2398d22b91bc201e3d4fb94.tar.gz
rust-fe55eee9a55a1019a2398d22b91bc201e3d4fb94.zip
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.
Diffstat (limited to 'library/std/src/net/tcp.rs')
0 files changed, 0 insertions, 0 deletions