Kernel: Remove SYS_DUP and implement it using fcntl F_DUPFD

This commit is contained in:
2025-01-17 19:22:53 +02:00
parent 82978da5e3
commit 9893c90e74
6 changed files with 22 additions and 26 deletions

View File

@@ -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) \

View File

@@ -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)