dup2.c 74 B

123456
  1. int
  2. dup2(oldfd, newfd)
  3. {
  4. close(newfd);
  5. return fcntl(oldfd, 0, newfd);
  6. }