pub fn sys_dup(&self, fd1: FileDesc) -> SysResult {
        info!("dup: from {:?}", fd1);
        let proc = self.linux_process();
        let file_like = proc.get_file_like(fd1)?.dup();
        let fd2 = proc.add_file(file_like)?;
        Ok(fd2.into())
    }
/// create a copy of the file descriptor fd, and uses the lowest-numbered unused descriptor for the new descriptor.
create a copy of the file descriptor fd, and uses the lowest-numbered unused descriptor for the new descriptor.
create a copy of the file descriptor fd and uses the lowest - numbered unused descriptor for the new descriptor .
pub fn sys_dup(&self, fd1: FileDesc) -> SysResult {
        info!("dup: from {:?}", fd1);
        let proc = self.linux_process();
        let file_like = proc.get_file_like(fd1)?.dup();
        let fd2 = proc.add_file(file_like)?;
        Ok(fd2.into())
    }
pub fn sys_dup ( & self , fd1 : FileDesc ) -> SysResult { info ! ( " " fd1 ) ; let proc = self . linux_process ( ) ; let file_like = proc . get_file_like ( fd1 ) ? . dup ( ) ; let fd2 = proc . add_file ( file_like ) ? ; Ok ( fd2 . into ( ) ) }
create a copy of the file descriptor fd, and uses the lowest-numbered unused descriptor for the new descriptor.
create a copy of the file descriptor fd and uses the lowest - numbered unused descriptor for the new descriptor .
&self
fd1
FileDesc
&self
fd1
FileDesc