working sync() code

David Fritz zeroxdf@att.net
Sun Apr 11 05:03:00 GMT 2004


GARY VANSICKLE wrote:
[...]
> FlushFileBuffers() doesn't actually do much last I checked.  Despite its
> misleading name, it is not a
> "commit-to-disk-and-don't-return-until-its-done" 
[...]

SUSv3 has this to say about sync():

<quote>
The sync() function shall cause all information in memory that updates file 
systems to be scheduled for writing out to all file systems.

The writing, although scheduled, is not necessarily complete upon return from 
sync().
</quote>

So such semantics don't seem to be necessary.

It also indicates that sync() should return void not int.

Cheers


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list