ruby-changes:19854
From: usa <ko1@a...>
Date: Thu, 2 Jun 2011 12:35:53 +0900 (JST)
Subject: [ruby-changes:19854] usa:r31901 (trunk): * io.c (io_flush, rb_io_flush): need to fsync() when ruby calls internal
usa 2011-06-02 12:35:40 +0900 (Thu, 02 Jun 2011) New Revision: 31901 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31901 Log: * io.c (io_flush, rb_io_flush): need to fsync() when ruby calls internal flush. [ruby-core:36670] [Bug #4813] Modified files: trunk/ChangeLog trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 31900) +++ ChangeLog (revision 31901) @@ -1,3 +1,8 @@ +Thu Jun 2 12:33:09 2011 NAKAMURA Usaku <usa@r...> + + * io.c (io_flush, rb_io_flush): need to fsync() when ruby calls internal + flush. [ruby-core:36670] [Bug #4813] + Thu Jun 2 07:56:24 2011 Hidetoshi NAGAI <nagai@a...> * ext/tk/tcltklib.c: reduce CPU power required by an eventloop. Index: io.c =================================================================== --- io.c (revision 31900) +++ io.c (revision 31901) @@ -682,6 +682,9 @@ return -1; rb_io_check_closed(fptr); } +#ifdef _WIN32 + fsync(fptr->fd); +#endif return 0; } @@ -1054,9 +1057,6 @@ if (fptr->mode & FMODE_WRITABLE) { if (io_fflush(fptr) < 0) rb_sys_fail(0); -#ifdef _WIN32 - fsync(fptr->fd); -#endif } if (fptr->mode & FMODE_READABLE) { io_unread(fptr); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/