summaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog5
-rw-r--r--io.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a678de8b2a..d653ab3aa8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Dec 25 13:28:20 2008 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * io.c (rb_io_flush): fsync() after buffer is flushed on win32.
+ [ruby-core:20043]
+
Thu Dec 25 14:32:23 2008 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_method_search): fix control flow bug.
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);