summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-05 06:30:11 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-05 06:30:11 +0000
commit66c9241789cd80fde9aa8731f4daa04f0c20b08d (patch)
tree2a6cfdd466bce5e957ca8e1211851b8fa3651221 /io.c
parentf66f36d37189e9ede1c4050537e625becad21e78 (diff)
merge revision(s) 24223:
* io.c (rb_io_flush): fsync() after buffer is flushed on win32. backported from trunk. [ruby-core:20043] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24406 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 3799c1b622..7151041dd9 100644
--- a/io.c
+++ b/io.c
@@ -650,6 +650,9 @@ rb_io_flush(io)
f = GetWriteFile(fptr);
io_fflush(f, fptr);
+#ifdef _WIN32
+ fsync(fileno(f));
+#endif
return io;
}