unsafe fn dup_fd(fd: RawFd) -> Result<RawFd>