summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-24 19:08:08 +0000
committerwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-24 19:08:08 +0000
commit1da4e3b919e99e6128ab017f215a909304dd6743 (patch)
tree80f6c61154fe1b02b508acd53666099fba2ad71a /io.c
parent91b056e10d2e3c6ba5f3c684273859512c2391d9 (diff)
Backport #776 [ruby-core:20043]; Added an #ifdef _WIN32 to rb_io_flush in io.c to fsync on windows to ensure that a flush took place.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@28003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/io.c b/io.c
index dc06d1062e..bb5ea9fa82 100644
--- a/io.c
+++ b/io.c
@@ -643,7 +643,9 @@ rb_io_flush(io)
f = GetWriteFile(fptr);
io_fflush(f, fptr);
-
+#ifdef _WIN32
+ fsync(fileno(f));
+#endif
return io;
}