-----BEGIN PGP SIGNED MESSAGE----- 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 [EMAIL PROTECTED] -----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 iEYEARECAAYFAkg1aUgACgkQ84KuGfSFAYCq/ACg0AFpP7E2D5kMqD/wPGB+WJyo OnIAoNFzNZXKikteHZ6FsM84ltgQKBAp =CiKn -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
