1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* io.c (rb_io_fsync): revert a part of r45254. explicit fsync should update

the metadata.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2014-03-02 18:08:04 +00:00
parent 5c8b8c03b3
commit e1c40b1967
2 changed files with 7 additions and 3 deletions

View file

@ -1,8 +1,8 @@
Mon Mar 3 02:53:53 2014 NAKAMURA Usaku <usa@ruby-lang.org> Mon Mar 3 02:53:53 2014 NAKAMURA Usaku <usa@ruby-lang.org>
* io.c (rb_io_flush_raw, rb_io_fsync): [EXPERIMENTAL] remove force * io.c (rb_io_flush_raw): [EXPERIMENTAL] remove force syncing for Win32
syncing for Win32 to speed up IO. this may break some tests, and to speed up IO. this may break some tests, and they'll be fixed
they'll be fixed later. later.
[ruby-core:58570] [Bug #9153] [ruby-core:58570] [Bug #9153]
Mon Mar 3 00:17:43 2014 NAKAMURA Usaku <usa@ruby-lang.org> Mon Mar 3 00:17:43 2014 NAKAMURA Usaku <usa@ruby-lang.org>

4
io.c
View file

@ -1925,6 +1925,10 @@ rb_io_fsync(VALUE io)
if (io_fflush(fptr) < 0) if (io_fflush(fptr) < 0)
rb_sys_fail(0); rb_sys_fail(0);
# ifndef _WIN32
if ((int)rb_thread_io_blocking_region(nogvl_fsync, fptr, fptr->fd) < 0)
rb_sys_fail_path(fptr->pathv);
# endif
return INT2FIX(0); return INT2FIX(0);
} }
#else #else