mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert r52154
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
acc94eb939
commit
ff132bc0f4
2 changed files with 1 additions and 16 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,13 +1,3 @@
|
||||||
Sun Oct 18 08:26:51 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
|
||||||
|
|
||||||
* io.c (fptr_finalize): don't release gvl if fptr is not writable.
|
|
||||||
writable fd may block on close(2) when it's on NFS. But readonly
|
|
||||||
fd doesn't. [Bug #11559]
|
|
||||||
result: make benchmark OPTS="-p bm_require_t -e ruby-trunk -e ruby-2.2.2"
|
|
||||||
build-ruby: 0.171
|
|
||||||
ruby 2.3.0dev(r52151): 0.659
|
|
||||||
ruby 2.2.0p95 (r50295): 0.834
|
|
||||||
|
|
||||||
Sun Oct 18 05:11:22 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
Sun Oct 18 05:11:22 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
* ruby.c (open_load_file): reset O_NONBLOCK after open.
|
* ruby.c (open_load_file): reset O_NONBLOCK after open.
|
||||||
|
|
7
io.c
7
io.c
|
@ -4263,7 +4263,6 @@ fptr_finalize(rb_io_t *fptr, int noraise)
|
||||||
VALUE err = Qnil;
|
VALUE err = Qnil;
|
||||||
int fd = fptr->fd;
|
int fd = fptr->fd;
|
||||||
FILE *stdio_file = fptr->stdio_file;
|
FILE *stdio_file = fptr->stdio_file;
|
||||||
int mode = fptr->mode;
|
|
||||||
|
|
||||||
if (fptr->writeconv) {
|
if (fptr->writeconv) {
|
||||||
if (fptr->write_lock && !noraise) {
|
if (fptr->write_lock && !noraise) {
|
||||||
|
@ -4304,11 +4303,7 @@ fptr_finalize(rb_io_t *fptr, int noraise)
|
||||||
/* fptr->fd may be closed even if close fails.
|
/* fptr->fd may be closed even if close fails.
|
||||||
* POSIX doesn't specify it.
|
* POSIX doesn't specify it.
|
||||||
* We assumes it is closed. */
|
* We assumes it is closed. */
|
||||||
|
if ((maygvl_close(fd, noraise) < 0) && NIL_P(err))
|
||||||
/**/
|
|
||||||
int keepgvl = !(mode & FMODE_WRITABLE);
|
|
||||||
keepgvl |= noraise;
|
|
||||||
if ((maygvl_close(fd, keepgvl) < 0) && NIL_P(err))
|
|
||||||
err = noraise ? Qtrue : INT2NUM(errno);
|
err = noraise ? Qtrue : INT2NUM(errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue