diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-30 01:47:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-30 01:47:23 +0000 |
commit | 54816d10eb5decfaec4155646f7aecc4f96311eb (patch) | |
tree | 841a164c952e2de925cf47f1c6a58ab774df6542 /io.c | |
parent | f0b021c0cef7adbbca2574ceba4be6abacbdaf90 (diff) | |
download | ruby-54816d10eb5decfaec4155646f7aecc4f96311eb.tar.gz |
* 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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); |