A Syscall used to create a copy of a File Descriptor.

int dup2(int oldfd, int newfd)
  • Returns non-negative integer if works
  • Returns -1 on error