Available on crate feature
stdio
only.Expand description
Functions returning the stdio file descriptors.
§Safety
Some of the functions in this module can cause the process’ stdio file descriptors to be closed, which breaks the assumption made in Rust’s std that these file descriptors are always open.
And in no-std mode, some of the functions in this module similarly assume that the process’ stdio file descriptors are open, which we don’t take as given in no-std mode because we don’t have std also making that assumption.
See the individual functions’ safety comments for more details.
Functions§
- dup2_
stderr - Utility function to safely
dup2
over stderr (fd 2). - dup2_
stdin - Utility function to safely
dup2
over stdin (fd 0). - dup2_
stdout - Utility function to safely
dup2
over stdout (fd 1). - raw_
stderr STDERR_FILENO
—Standard error, raw.- raw_
stdin STDIN_FILENO
—Standard input, raw.- raw_
stdout STDOUT_FILENO
—Standard output, raw.- stderr
STDERR_FILENO
—Standard error, borrowed.- stdin
STDIN_FILENO
—Standard input, borrowed.- stdout
STDOUT_FILENO
—Standard output, borrowed.- take_
stderr ⚠ STDERR_FILENO
—Standard error, owned.- take_
stdin ⚠ STDIN_FILENO
—Standard input, owned.- take_
stdout ⚠ STDOUT_FILENO
—Standard output, owned.