diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | io.c | 1 |
2 files changed, 5 insertions, 0 deletions
@@ -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. @@ -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)); |