aboutsummaryrefslogtreecommitdiff
path: root/sys/src/dup.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/src/dup.c')
-rw-r--r--sys/src/dup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/src/dup.c b/sys/src/dup.c
index 0943f52..5877df3 100644
--- a/sys/src/dup.c
+++ b/sys/src/dup.c
@@ -1,7 +1,8 @@
#include "internal.h"
int
-sys·dup(int fd)
+sys·dup(int oldfd, int newfd)
{
- return syscall(·Dup, fd);
+ intptr ret = syscall(·Dup2, oldfd, newfd);
+ return error(ret);
}