2018-05-02 06:20:06 +03:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <syscall.h>
|
2018-12-10 04:09:27 +03:00
|
|
|
#include <syscall_nums.h>
|
2018-05-02 06:20:06 +03:00
|
|
|
|
2018-12-10 04:09:27 +03:00
|
|
|
DEFN_SYSCALL2(dup2, SYS_DUP2, int, int);
|
2018-05-02 06:20:06 +03:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|