Project

General

Profile

Backport #776

File#flush doesn't flush in windows

Added by rogerdpack (Roger Pack) over 10 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:20043]

Description

=begin
In windows, File#flush flushes ruby's internal buffers, however, the result is different from Linux.
I'd recommend adding an arbitrary fsync if you're in windows to ensure the buffers are actually flushed, to avoid unexpected cross platform bugs [such as one that attachment_fu has].
[ruby-core:19940]
This in 1.9/1.8.x
Thanks!
-=Roger
=end

Associated revisions

Revision 1da4e3b9
Added by wyhaines (Kirk Haines) about 9 years ago

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

History

#1

Updated by matz (Yukihiro Matsumoto) over 10 years ago

  • Assignee set to usa (Usaku NAKAMURA)

=begin

=end

#2

Updated by usa (Usaku NAKAMURA) over 10 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r20982.
=end

#3

Updated by rogerdpack (Roger Pack) over 10 years ago

=begin
Thanks for doing that. Would it be possible to backport these to 1.8 branch, too?

=end

#4

Updated by rogerdpack (Roger Pack) over 10 years ago

=begin
Wonder if it's related to recent zlib difficulties:
http://www.misuse.org/science/2007/09/07/ruby-zlib-buffer-error-on-windows/`

=end

#5

Updated by shyouhei (Shyouhei Urabe) over 10 years ago

  • Status changed from Closed to Open
  • % Done changed from 100 to 0

=begin
Moved to backport/1.8
=end

#6

Updated by usa (Usaku NAKAMURA) about 10 years ago

  • Status changed from Open to Assigned

=begin

=end

#7

Updated by usa (Usaku NAKAMURA) about 10 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r24223.
=end

#8

Updated by rogerdpack (Roger Pack) about 10 years ago

=begin
thanks for doing that.
=r
=end

#9

Updated by shyouhei (Shyouhei Urabe) almost 10 years ago

  • Status changed from Closed to Assigned
  • Assignee changed from usa (Usaku NAKAMURA) to shyouhei (Shyouhei Urabe)

=begin

=end

#10

Updated by shyouhei (Shyouhei Urabe) almost 10 years ago

  • Status changed from Assigned to Closed

=begin
Applied in changeset r24406.
=end

#11

Updated by shyouhei (Shyouhei Urabe) almost 10 years ago

  • Status changed from Closed to Assigned
  • Assignee changed from shyouhei (Shyouhei Urabe) to wyhaines (Kirk Haines)

=begin

=end

#12

Updated by wyhaines (Kirk Haines) about 9 years ago

  • Status changed from Assigned to Closed

=begin
This issue was solved with changeset r28003.
Roger, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Also available in: Atom PDF