Kernel: Remove SYS_DUP and implement it using fcntl F_DUPFD
This commit is contained in:
@@ -36,7 +36,6 @@ __BEGIN_DECLS
|
||||
O(SYS_SET_PWD, setpwd) \
|
||||
O(SYS_CLOCK_GETTIME, clock_gettime) \
|
||||
O(SYS_PIPE, pipe) \
|
||||
O(SYS_DUP, dup) \
|
||||
O(SYS_DUP2, dup2) \
|
||||
O(SYS_KILL, kill) \
|
||||
O(SYS_TCGETPGRP, tcgetpgrp) \
|
||||
|
||||
@@ -125,7 +125,7 @@ int fsync(int fildes)
|
||||
|
||||
int dup(int fildes)
|
||||
{
|
||||
return syscall(SYS_DUP, fildes);
|
||||
return fcntl(fildes, F_DUPFD, 0);
|
||||
}
|
||||
|
||||
int dup2(int fildes, int fildes2)
|
||||
|
||||
Reference in New Issue
Block a user