Other items inposish::io
pub fn dup<Fd: AsFd>(fd: &Fd) -> Result<OwnedFd>
dup(fd)
Note that this does not set the O_CLOEXEC flag. To do a dup that does set O_CLOEXEC, use fcntl_dupfd_cloexec.
O_CLOEXEC
fcntl_dupfd_cloexec