www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/07/26/20:18:55

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Subject: Re: stat() whacks st_atime
From: Robert Collins <robert DOT collins AT itdomain DOT com DOT au>
To: Jason Tishler <jason AT tishler DOT net>
Cc: Cygwin-Developers <cygwin-developers AT sources DOT redhat DOT com>
In-Reply-To: <20010726111649.C439@dothill.com>
References: <20010726111649 DOT C439 AT dothill DOT com>
X-Mailer: Evolution/0.11 (Beta Release)
Date: 27 Jul 2001 10:21:09 +1000
Message-Id: <996193288.23093.2.camel@lifelesswks>
Mime-Version: 1.0
X-OriginalArrivalTime: 27 Jul 2001 00:07:44.0217 (UTC) FILETIME=[28D1E490:01C11630]

On 26 Jul 2001 11:16:49 -0400, Jason Tishler wrote:
> Chris,
> 
> On Thu, Jul 26, 2001 at 10:45:39AM -0400, Christopher Faylor wrote:
> > I suspect that a simple test case would help unperplex you.
> 
> I did write many simple test cases before bothering the list.  Attached
> is, wtest2, one that mimics fstat()'s behavior (with regard to the
> Win32 calls).  I also stole the the values passed to CreateFile() from
> an strace run of stest (just in case how the file was opened caused
> the problem).  For some reason, wtest2 does not affect atime.  Hence,
> if CloseHandle() is indeed the culprit, then it isn't one all of the
> time.
My guess would be it's the file header reading logic - looking for
#!/bin/foo

that means that a file access _has occured_. CloseHandle triggering the
actual write might jsut eb a win32 optimisation, to only wr

> If you have any hints for a simple test case that would illuminate me,
> it would be much appreciated.
> 
> > I also suspect that CloseHandle is updating the atime.
> 
> That was my "conclusion" too from stepping via gdb -- but, I found it
> hard to believe.  I searched the MSDN and google for MS atime issues
> but came up empty.
> 
> Nevertheless, isn't the the bigger issue about how Cygwin should deal with
> this problem?  If Cygwin's stat() affects st_atime (even indirectly),
> then this is going to break Unix apps.  I have already found one (i.e.,
> mutt), there are bound to be others.
> 
> Thanks,
> Jason
> 
> -- 
> Jason Tishler
> Director, Software Engineering       Phone: 732.264.8770 x235
> Dot Hill Systems Corp.               Fax:   732.264.8798
> 82 Bethany Road, Suite 7             Email: Jason DOT Tishler AT dothill DOT com
> Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com


- Raw text -


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