Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 To: Jason Tishler Cc: Cygwin-Developers In-Reply-To: <20010726111649.C439@dothill.com> References: <20010726111649 DOT C439 AT dothill DOT com> Content-Type: text/plain Content-Transfer-Encoding: 7bit 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