summaryrefslogtreecommitdiff
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
commitb9bab4280449eb62a132fc8c061e5787447452e2 (patch)
tree69ba818a087cb6db52ba9ed5fc87a75f35629a67 /io.c
parent78e7472cad31f597134d9fa28c8992d450b47f43 (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: svn+ssh://ci.ruby-lang.org/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 6057992591..3331d442f4 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);