This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How exactly does ctime work?

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

>  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
method fhandler_base::fstat_helper(), right the first comment.


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

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]