From 5ab3fa5c31b3c7f90fd7c3e0cfa1bc2ecd17c3d8 Mon Sep 17 00:00:00 2001 From: yugui Date: Thu, 25 Dec 2008 09:57:13 +0000 Subject: merges r20982 and r20983 from trunk into ruby_1_9_1. * io.c (rb_io_flush): fsync() after buffer is flushed on win32. [ruby-core:20043] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'io.c') diff --git a/io.c b/io.c index 605799259..3331d442f 100644 --- a/io.c +++ b/io.c @@ -983,6 +983,9 @@ rb_io_flush(VALUE io) if (fptr->mode & FMODE_WRITABLE) { io_fflush(fptr); +#ifdef _WIN32 + fsync(fptr->fd); +#endif } if (fptr->mode & FMODE_READABLE) { io_unread(fptr); -- cgit