toaruos/libc/unistd/dup2.c
2018-06-25 16:34:07 +09:00

13 lines
198 B
C

#include <unistd.h>
#include <syscall.h>
DEFN_SYSCALL2(dup2, 22, int, int);
int dup2(int oldfd, int newfd) {
return syscall_dup2(oldfd, newfd);
}
int dup(int oldfd) {
return dup2(oldfd, -1);
}