Function arceos_posix_api::sys_dup2
source · pub fn sys_dup2(old_fd: c_int, new_fd: c_int) -> c_intAvailable on crate feature
fd only.Expand description
Duplicate a file descriptor, but it uses the file descriptor number specified in new_fd.
TODO: dup2 should forcibly close new_fd if it is already opened.