delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/05/09/03:07:19

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 9 May 2012 09:06:25 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: How exactly does ctime work?
Message-ID: <20120509070625.GF17185@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CA+jjjYR+NQwMDtahEVze1bY9H3k+gfWP-LocBdQVmaPRvmMtbg AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CA+jjjYR+NQwMDtahEVze1bY9H3k+gfWP-LocBdQVmaPRvmMtbg@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

On May  8 16:06, Joshua Hudson wrote:
> We had a weird incident involving ctime changing unexpectedly when
> mtime did not.
> 
> On a normal UNIX system, we'd immediately say somebody changed the
> file and set mtime back, 

Or something has set ctime without setting mtime, like chmod, chown, and
the likes.

>  but on Cygwin, ctime appears to be synthetic.
> How exactly does ctime work on Cygwin?

No, it isn't synthetic, except for FAT or FAT32 filesystems.

NTFS, NFS, Samba etc. support ctime, and it's set by the OS.  Cygwin
just uses the value like any other time value.

On FSes not supporting ctime, ctime is just faked to be == mtime by
Cygwin.

>  I can't find any useful
> documentation except for some mailing list discussions circa 2005 that
> leave me with no answers.

The source code might have helped.  See
http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_disk_file.cc?rev=1.376&content-type=text/x-cvsweb-markup&cvsroot=src
method fhandler_base::fstat_helper(), right the first comment.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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