summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/syscalls.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 2eb09017b..24d44bb8e 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -83,15 +83,7 @@ check_pty_fds (void)
int
dup (int fd)
{
- int res;
- cygheap_fdnew newfd;
-
- if (newfd < 0)
- res = -1;
- else
- res = dup2 (fd, newfd);
-
- return res;
+ return cygheap->fdtab.dup2 (fd, cygheap_fdnew ());
}
int