coreutils-6.11-1 in release-2 area

Eric Blake
Thu May 22 12:39:00 GMT 2008

Hash: SHA1

According to Corinna Vinschen on 5/22/2008 6:30 AM:
|>> Meanwhile, it IS a bit annoying that Posix 200x decided not to standardize
|>> utimensat(fd,NULL,times,flag) as changing the times on fd rather than
|>> treating fd as the directory starting point; once you have an open fd,
|>> having to refer to the file by name again is potentially racy.
|> No need to refer the dir by name:
|>   futimens (dirfd. timespec);
| Btw., even if you don't consider the Posix 200x functions
| futimens/utimensat, you don't need futimsat(dirfd, NULL, timeval):
|     futimes (dirfd, timeval);
| So, actually I think that using futimesat this way is a gratuitous
| utilization of a glibc extension.

Without futimens/utimensat, there is no way to set nanosecond resolution
(where that granularity is supported).  As far as I can tell, the only
reason that coreutils still uses the non-standardized futimesat with a
NULL pathname is that it provided more resolution than any standardized
function, while supporting glibc that had not yet implemented the
standardized futimens/utimensat.  I guess all that is needed now is a
patch to coreutils and/or gnulib to prefer the standardized names (and
fall back to futimesat under the hood when needed), rather than preferring
the non-standardized name.

- --
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 -


More information about the Cygwin-apps mailing list