delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/28/00:10:28

Message-Id: <200410280410.i9S4AQ1L021469@delorie.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Gary R. Van Sickle" <g DOT r DOT vansickle AT worldnet DOT att DOT net>
To: "'cygwin'" <cygwin AT cygwin DOT com>
Subject: RE: sync(2)
Date: Wed, 27 Oct 2004 23:09:41 -0500
MIME-Version: 1.0
In-Reply-To: <417FDAF4.6050404@x-ray.at>
X-IsSubscribed: yes

> sync() should flush all open or cached file data and 
> metadata. and volume master blocks.
>

Not according to POSIX:

http://www.opengroup.org/onlinepubs/007908799/xsh/sync.html
"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

Right.

> (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
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019