Skip to main content

SYS_DUP2

Constant SYS_DUP2 

Source
pub const SYS_DUP2: usize = 433; // 433usize
Expand description

Duplicate a file descriptor to a specific number.

  • old_fd: file descriptor to duplicate
  • new_fd: desired new file descriptor number

If new_fd is already open, it is closed first. Returns new_fd.