man dup2 () - See dup.3posix

REFERENCE

See dup.3posix