aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-28 12:02:33 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-28 12:02:33 +0900
commitff7f71b28889e043798dddfec568083cc7db204a (patch)
tree6f640c253e4931450dd55736ef7daee42ed23c78 /io.c
parent14b0c94ac38c40459d908fd4c5778efa60e4689f (diff)
downloadruby-ff7f71b28889e043798dddfec568083cc7db204a.tar.gz
O_EXCL has no meaning for fdopen
"exclusive access mode is not supported" exception has resulted in empty "rubyheap-*.json" files after test/objspace/test_objspace.rb.
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 0db981e39c..5e04da806b 100644
--- a/io.c
+++ b/io.c
@@ -8037,7 +8037,7 @@ FILE *
rb_io_stdio_file(rb_io_t *fptr)
{
if (!fptr->stdio_file) {
- int oflags = rb_io_fmode_oflags(fptr->mode);
+ int oflags = rb_io_fmode_oflags(fptr->mode) & ~O_EXCL;
fptr->stdio_file = rb_fdopen(fptr->fd, rb_io_oflags_modestr(oflags));
}
return fptr->stdio_file;