diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-30 15:17:27 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-30 15:17:27 +0000 |
commit | 5c19f077008f6e6633e15a8d15fceb4b17d37208 (patch) | |
tree | 435a57136340ae2903a394b2743e23f4a6a12ea9 /process.c | |
parent | e7f8c03818873b7cd64cb5080fe329098352af6c (diff) | |
download | ruby-5c19f077008f6e6633e15a8d15fceb4b17d37208.tar.gz |
* include/ruby/intern.h (rb_cloexec_fcntl_dupfd): declared.
* io.c (rb_cloexec_fcntl_dupfd): new function.
(nogvl_io_cntl): use rb_cloexec_fcntl_dupfd.
* process.c (move_fds_to_avoid_crash): use rb_cloexec_fcntl_dupfd.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2508,10 +2508,10 @@ move_fds_to_avoid_crash(int *fdp, int n, VALUE fds) min = fdp[i]+1; while (RTEST(rb_hash_lookup(fds, INT2FIX(min)))) min++; - ret = fcntl(fdp[i], F_DUPFD, min); + ret = rb_cloexec_fcntl_dupfd(fdp[i], min); if (ret == -1) return -1; - rb_fd_set_cloexec(ret); + rb_update_max_fd(ret); close(fdp[i]); fdp[i] = ret; } |