Skip to content

Commit 43d41e3

Browse files
libstd: rustdoc: correct note on fds 0/1/2 pre-main
Closes: rust-lang#137490
1 parent 3abc694 commit 43d41e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: std/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@
174174
//!
175175
//! - after-main use of thread-locals, which also affects additional features:
176176
//! - [`thread::current()`]
177-
//! - before-main stdio file descriptors are not guaranteed to be open on unix platforms
177+
//! - under UNIX, before main, file descriptors 0, 1, and 2 may be unchanged
178+
//! (they are guaranteed to be open during main,
179+
//! and are opened to /dev/null O_RDWR if they weren't open on program start)
178180
//!
179181
//!
180182
//! [I/O]: io

0 commit comments

Comments
 (0)