Searched refs:newfd (Results 1 – 2 of 2) sorted by relevance
412 pub fn dup2(oldfd: i32, newfd: i32) -> Result<usize, SystemError> { in dup2()415 if FileDescriptorVec::validate_fd(oldfd) && FileDescriptorVec::validate_fd(newfd) { in dup2()417 if oldfd == newfd { in dup2()419 return Ok(newfd as usize); in dup2()423 if fds.fds[newfd as usize].is_some() { in dup2()425 if let Err(_) = current_pcb().drop_fd(newfd) { in dup2()438 .alloc_fd(*file_cp.unwrap(), Some(newfd)) in dup2()
725 let newfd: i32 = args[1] as c_int; in handle() localVariable726 Self::dup2(oldfd, newfd) in handle()