diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-05 10:13:00 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-05 10:13:00 +0000 |
commit | 333c847f19a0e9d53ab3021fed7517a5604d2bf4 (patch) | |
tree | 688f3545d5ac1a02ffbf714b51e482a2b22db428 /io.c | |
parent | a3521e0261d229f8402cc84a018d2bc1a64fcc5a (diff) | |
download | ruby-333c847f19a0e9d53ab3021fed7517a5604d2bf4.tar.gz |
* io.c (rb_cloexec_fcntl_dupfd): don't clear try_dupfd_cloexec if
fcntl(F_DUPFD) failed as fcntl(F_DUPFD_CLOEXEC).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -297,8 +297,10 @@ rb_cloexec_fcntl_dupfd(int fd, int minfd) } /* F_DUPFD_CLOEXEC is available since Linux 2.6.24. Linux 2.6.18 fails with EINVAL */ if (errno == EINVAL) { - try_dupfd_cloexec = 0; ret = fcntl(fd, F_DUPFD, minfd); + if (ret != -1) { + try_dupfd_cloexec = 0; + } } } else { |