rust/library
Dan Gohman ee02f01ea6 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-04 05:09:38 -08:00
..
alloc Rollup merge of #92399 - Veeupup:fix_vec_typo, r=Dylan-DPC 2022-02-28 20:05:13 +01:00
backtrace@b02ed04a7e Updated backtrace submodule 2021-11-02 12:31:34 +01:00
core Rollup merge of #94551 - darnuria:doc-map-backstick, r=dtolnay 2022-03-03 20:01:47 +01:00
panic_abort Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
panic_unwind library/panic_unwind: Define UNWIND_DATA_REG for m68k 2022-02-12 20:19:06 +00:00
portable-simd Fix unused_doc_comments lint errors 2022-03-02 20:06:35 +01:00
proc_macro Auto merge of #92598 - Badel2:panic-update-hook, r=yaahc 2022-01-16 02:18:42 +00:00
profiler_builtins Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rtstartup
rustc-std-workspace-alloc Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-core Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-std Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
std Consistently present absent stdio handles on Windows as NULL handles. 2022-03-04 05:09:38 -08:00
stdarch@bcbe010614 Update stdarch submodule 2022-03-02 20:06:46 +01:00
test Switch bootstrap cfgs 2022-02-25 08:00:52 -05:00
unwind library/unwind: Define unwinder_private_data_size for m68k 2022-02-12 20:21:10 +00:00