summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dtable.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r--winsup/cygwin/dtable.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 22303dfde..c361d01da 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -621,7 +621,7 @@ dtable::dup2 (int oldfd, int newfd)
if (newfd == oldfd)
{
- res = 0;
+ res = newfd;
goto done;
}