[−][src]Function palaver::file::copy_fd
pub fn copy_fd(
oldfd: RawFd,
newfd: RawFd,
flags: Option<FdFlag>,
allow_nonexistent: bool
) -> Result<()>
Copy a file descriptor. Flags are passed atomically. flags
being None
copies the flags from oldfd
. Panics if newfd
doesn't exist and allow_nonexistent
isn't set; this can help debug the race of another thread creating newfd
and having it deleted from under it by us.