summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-25 09:57:13 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-25 09:57:13 +0000
commit5ab3fa5c31b3c7f90fd7c3e0cfa1bc2ecd17c3d8 (patch)
tree69ba818a087cb6db52ba9ed5fc87a75f35629a67 /io.c
parent43ad16ce1afbcbf46e6d0f2911b033dc9348ec18 (diff)
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
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 3 insertions, 0 deletions
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);