toaruos/libc/unistd/dup2.c

14 lines
230 B
C
Raw Normal View History

#include <unistd.h>
#include <syscall.h>
#include <syscall_nums.h>
DEFN_SYSCALL2(dup2, SYS_DUP2, int, int);
int dup2(int oldfd, int newfd) {
return syscall_dup2(oldfd, newfd);
}
2018-06-25 10:28:13 +03:00
int dup(int oldfd) {
return dup2(oldfd, -1);
}