Function nix::unistd::dup3

pub fn dup3(oldfd: RawFd, newfd: RawFd, flags: OFlag) -> Result<RawFd>
Documentation

Create a new copy of the specified file descriptor using the specified fd and flags (see dup(2)).

This function behaves similar to dup2() but allows for flags to be specified.

On this page