[][src]Function palaver::file::move_fd

pub fn move_fd(
    oldfd: RawFd,
    newfd: RawFd,
    flags: Option<FdFlag>,
    allow_nonexistent: bool
) -> Result<(), Error>

Move 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.