Module stdio
Available on crate feature
dep_rustix
only.Expand description
Functions returning the stdio file descriptors.
§Safety
These access the file descriptors by absolute index value, and nothing
prevents them from being closed and reused. They should only be used in
main
or other situations where one is in control of the process’ stdio
streams.
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.