diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-29 11:02:32 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-29 11:02:32 +0000 |
commit | 4ae2b92576e8e9fc43906e9483c79eff9d0522f7 (patch) | |
tree | 4890cf79c2f4571079c7dd93a12a1fd011e7a1ec /ext/openssl/ossl_bio.c | |
parent | 3bffb5f3064b129941a2cf6f459aeb85e8469ea7 (diff) | |
download | ruby-4ae2b92576e8e9fc43906e9483c79eff9d0522f7.tar.gz |
* include/ruby/intern.h (rb_cloexec_dup): declared.
* io.c (rb_cloexec_dup): new function.
(ruby_dup): use rb_cloexec_dup.
* ext/pty/pty.c (pty_getpty): use rb_cloexec_dup.
* ext/openssl/ossl_bio.c (ossl_obj2bio): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_bio.c')
-rw-r--r-- | ext/openssl/ossl_bio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl_bio.c b/ext/openssl/ossl_bio.c index da63c722e5..a11c08c1a3 100644 --- a/ext/openssl/ossl_bio.c +++ b/ext/openssl/ossl_bio.c @@ -25,10 +25,10 @@ ossl_obj2bio(VALUE obj) GetOpenFile(obj, fptr); rb_io_check_readable(fptr); - if ((fd = dup(FPTR_TO_FD(fptr))) < 0){ + if ((fd = rb_cloexec_dup(FPTR_TO_FD(fptr))) < 0){ rb_sys_fail(0); } - rb_fd_set_cloexec(fd); + rb_update_max_fd(fd); if (!(fp = fdopen(fd, "r"))){ close(fd); rb_sys_fail(0); |