summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-30 01:47:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-30 01:47:23 +0000
commit54816d10eb5decfaec4155646f7aecc4f96311eb (patch)
tree841a164c952e2de925cf47f1c6a58ab774df6542 /io.c
parentf0b021c0cef7adbbca2574ceba4be6abacbdaf90 (diff)
* io.c (rb_cloexec_dup, rb_cloexec_dup2): CLOEXEC has been set if
dup3 succeeded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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);