Eric Blake <[EMAIL PROTECTED]> wrote: > 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.
Thanks for the write-up. That sounds like the right way to go. Do you feel like doing it? _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils