Function rustix::backend::conv::ret_discarded_fd
source · pub(super) unsafe fn ret_discarded_fd(raw: RetReg<R0>) -> Result<()>
Expand description
Convert the return value of dup2
and dup3
.
When these functions succeed, they return the same value as their second
argument, so we don’t construct a new OwnedFd
.
§Safety
The caller must ensure that this is the return value of a syscall which returns a file descriptor.