aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/io.c b/io.c
index d61dc5f31d..9f696136f2 100644
--- a/io.c
+++ b/io.c
@@ -217,6 +217,9 @@ rb_cloexec_dup(int oldfd)
try_fcntl = 0;
ret = dup(oldfd);
}
+ else {
+ return ret;
+ }
}
else {
ret = dup(oldfd);
@@ -246,6 +249,9 @@ rb_cloexec_dup2(int oldfd, int newfd)
try_dup3 = 0;
ret = dup2(oldfd, newfd);
}
+ else {
+ return ret;
+ }
}
else {
ret = dup2(oldfd, newfd);