This is the mail archive of the
mailing list for the Cygwin project.
- From: "Gary R. Van Sickle" <g dot r dot vansickle at worldnet dot att dot net>
- To: "'cygwin'" <cygwin at cygwin dot com>
- Date: Wed, 27 Oct 2004 23:09:41 -0500
- Subject: RE: sync(2)
> sync() should flush all open or cached file data and
> metadata. and volume master blocks.
Not according to POSIX:
"The sync() function causes 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()."
Since all write file operations in memory by definition 'schedule' the
operations to be written out, this means that a no-op sync() is completely
POSIX-compliant (and certainly "efficient"! ;-)). I don't know if that's
good or bad, and I sure am having a hard time figuring out why it's like
that, but that's the way it is.
> The problem is that I have a simple patch, but this might get
> tricky if there are more processes involved, which I doubt. I
> doubt that there such a thing exists and that it will be
> useful at all.
> We could also just flush all local NTFS volumes, but this
> would need Administrator privileges
> (and therefore probably
> cygserver support).
???... Oh, you mean cygserver running as Admin or SYSTEM or whatever and
doing it for cygwin1.dll. Yeah, that might work.
Gary R. Van Sickle
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html