summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-01 10:01:01 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-01 10:01:01 +0000
commit89a1258110b72b700016ea09cbd7b73c3a875dea (patch)
tree032a3315e2604e00e8dc32ca04514d88937d7e57
parentc882b8e84d4a3398671b0387c1294d9807a89b0b (diff)
* io.c (rb_io_reopen): call rb_maygvl_fd_fix_cloexec after freopen().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--io.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d37f1d9101..f29e73226b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Nov 1 19:00:30 2011 Tanaka Akira <akr@fsij.org>
+
+ * io.c (rb_io_reopen): call rb_maygvl_fd_fix_cloexec after freopen().
+
Tue Nov 1 17:17:26 2011 NARUSE, Yui <naruse@ruby-lang.org>
* file.c (file_expand_path): reset coderange after expanding path.
diff --git a/io.c b/io.c
index 50ee6871ca..41f9379d26 100644
--- a/io.c
+++ b/io.c
@@ -6059,6 +6059,7 @@ rb_io_reopen(int argc, VALUE *argv, VALUE file)
rb_sys_fail_path(fptr->pathv);
}
fptr->fd = fileno(fptr->stdio_file);
+ rb_maygvl_fd_fix_cloexec(fptr->fd);
#ifdef USE_SETVBUF
if (setvbuf(fptr->stdio_file, NULL, _IOFBF, 0) != 0)
rb_warn("setvbuf() can't be honoured for %s", RSTRING_PTR(fptr->pathv));