Question on sync

Christopher Faylor cgf-cygwin@cygwin.com
Tue Mar 4 05:52:00 GMT 2003


On Tue, Mar 04, 2003 at 10:52:35AM +0530, Manik, Raina (IE10) wrote:
>Does sync()on cygwin give the same guarantees as it does on other
>unices ?  Does it guarantee that all the file blocks in memory caches
>are flushed onto disk ?

No.  In fact sync() on cygwin does nothing at all.  It probably should
set ENOSYS.  fsync() works, though.  It is just a wrapper around this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/flushfilebuffers.asp

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list