mtime question

Eric Blake ebb9@byu.net
Tue Apr 8 02:28:00 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
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
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap04.html,
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             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkf62AMACgkQ84KuGfSFAYAHlACgkxjlUFhKQOTqwBiCncUjw8DE
qIkAnRptQjJYwbWZV+7q2oCkhXbeSTXI
=JxIF
-----END PGP SIGNATURE-----

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



More information about the Cygwin mailing list