Available on crate feature
stdio
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§
- Utility function to safely
dup2
over stderr (fd 2). - Utility function to safely
dup2
over stdin (fd 0). - Utility function to safely
dup2
over stdout (fd 1). STDERR_FILENO
—Standard error, raw.STDIN_FILENO
—Standard input, raw.STDOUT_FILENO
—Standard output, raw.STDERR_FILENO
—Standard error, borrowed.STDIN_FILENO
—Standard input, borrowed.STDOUT_FILENO
—Standard output, borrowed.STDERR_FILENO
—Standard error, owned.STDIN_FILENO
—Standard input, owned.STDOUT_FILENO
—Standard output, owned.