Function take_stdout
pub unsafe fn take_stdout() -> OwnedFd
Available on crate feature
dep_rustix
only.Expand description
STDOUT_FILENO
—Standard output, owned.
This is similar to stdout
, however it returns an OwnedFd
which closes
standard output when it is dropped.
§Safety
Safe std
-using Rust code is permitted to assume that the stdout file
descriptor is always valid. This function returns an OwnedFd
which will
close the stdout file descriptor when dropped.
§Warning
This has the same hazards as stdout
.