diff --git a/ChangeLog b/ChangeLog index fb83f93bd8..ea8eb44e22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,8 @@ Mon Mar 3 02:53:53 2014 NAKAMURA Usaku - * io.c (rb_io_flush_raw, rb_io_fsync): [EXPERIMENTAL] remove force - syncing for Win32 to speed up IO. this may break some tests, and - they'll be fixed later. + * io.c (rb_io_flush_raw): [EXPERIMENTAL] remove force syncing for Win32 + to speed up IO. this may break some tests, and they'll be fixed + later. [ruby-core:58570] [Bug #9153] Mon Mar 3 00:17:43 2014 NAKAMURA Usaku diff --git a/io.c b/io.c index 5abf1e241d..8d78d17e05 100644 --- a/io.c +++ b/io.c @@ -1925,6 +1925,10 @@ rb_io_fsync(VALUE io) if (io_fflush(fptr) < 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); } #else