bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-6.11-1 in release-2 area


From: Jim Meyering
Subject: Re: coreutils-6.11-1 in release-2 area
Date: Thu, 22 May 2008 14:42:42 +0200

Eric Blake <address@hidden> 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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]