www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/07/26/11:02:24

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
X-Apparently-From: <earnie?boyd AT yahoo DOT com>
Message-ID: <3B604CDD.103A772B@yahoo.com>
Date: Thu, 26 Jul 2001 11:01:17 -0600
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: CD List <Cygwin-Developers AT Cygwin DOT Com>
X-Mailer: Mozilla 4.77 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin-developers AT Cygwin DOT Com
Subject: Re: stat() whacks st_atime
References: <20010726104027 DOT B439 AT dothill DOT com> <20010726104539 DOT B16848 AT redhat DOT com>

Christopher Faylor wrote:
> 
> On Thu, Jul 26, 2001 at 10:40:27AM -0400, Jason Tishler wrote:
> >I'm trying to track down why st_atime gets "whacked" when calling
> >stat().  By "whacked," I mean set to the current time (or thereabouts).
> >
> >The attached program, stest.c, demonstrates the problem.  If one calls
> >it repeatedly, then the specified file's st_atime keeps changing.
> >
> >I've tracked down the problem to the following (in fhandler.cc):
> >
> >    int
> >    fhandler_base::close (void)
> >    {
> >      int res = -1;
> >
> >      syscall_printf ("handle %p", get_handle());
> >[1]   if (CloseHandle (get_handle()))
> >[2]     res = 0;
> >      ...
> >    }
> >
> >The st_atime is actually not affected directly by stat() and if stest is
> >stopped at [1] above, then the file's st_atime value is still unchanged
> >(as verified by a Win32 program).  If gdb continues to [2], then the
> >file's st_atime has been changed.
> >
> >Unfortunately, I cannot figure out what is affecting the change.  Is
> >there a Cygwin background thread that wakes up when the handle is
> >closed and somehow affects the file's st_atime?  Or, can CloseHandle()
> >itself somehow be the culprit.  I'm really perplexed.
> 
> I suspect that a simple test case would help unperplex you.  I also suspect
> that CloseHandle is updating the atime.

Aren't all three times treated equal on FAT within Cygwin?  A google
came up with http://www.cygwin.com/ml/cygwin-cvs/2000-q4/msg00067.html
which might answer this question.

Earnie.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

- Raw text -


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