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: mtime question

Hash: SHA1

According to Manuel Gonzalez Montoya on 4/7/2008 2:51 PM:
| Is the file's mtime supposed to change on every write to the file?.

No - the file's mtime is only supposed to be scheduled for update on every
write to a file, where the update period can be indefinitely into the
future, with the caveat that close() and stat() trigger any scheduled
updates to happen regardless of when updates are normally scheduled.  See,
section 4.7:

An implementation may update fields that are marked for update
immediately, or it may update such fields periodically. At an update point
in time, any marked fields shall be set to the current time and the update
marks shall be cleared. All fields that are marked for update shall be
updated when the file ceases to be open by any process, or when a stat(),
fstat(), or lstat() is performed on the file. Other times at which updates
are done are unspecified.

- --
Don't work too hard, make some time for fun as well!

Eric Blake   
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


Unsubscribe info:
Problem reports:

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