coreutils-6.11-1 in release-2 area

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

Hash: SHA1

According to Corinna Vinschen on 5/22/2008 5:56 AM:
| While we're talking about coreutils, it would be a good idea to use the
| latest Cygwin from CVS when testing coreutils further(*).  cp baild out
| on me because it used a NULL pathname in calls to futimesat, which I'd
| consider a bug in coreutils, but the Linux man page gives away that this
| is a GLIBC extension.  I fixed that in CVS so futimesat can now do its
| job (hopefully) correctly withe NULL pathname as well.
| However, here's a question:  Should coreutils really use futimesat at
| all when futimes and utimensat are available?  Isn't that sort of a
| buglet in coreutils?

Hmm.  There's some history here.  futimesat was the original proposal,
then Posix 200x changed their minds and decided to standardize utimensat
instead.  Gnulib implemented a version prior to glibc, then glibc picked
up the prototype that Posix was proposing which conflicted with gnulib (if
I recall correctly, it was the addition of a flag parameter).

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.  I wonder
if, in all of the flurry in the Austin Group about changing futimesat to
utimensat, that this use case was overlooked.  But cygwin should certainly
consider providing this as a useful extension, and coreutils should be
taught to snoop whether systems with futimesat/utimensat support also
honor this extension.

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