This patch adds POSIX futimensat function, which is able to set the time of the file with nanosecond precision. Both by name and by file descriptor. Times are handled internally in struct timespec, but the function allowing to set it was missing. Fix: Patch attached with submission follows:
This patch does not add the POSIX utimensat() and futimens() calls, but a non-standard function. This new function only solves one of the inexcusable problems with futimesat() (that it is limited to microsecond precision) but not that it cannot set times on symlinks. You can start with http://lists.freebsd.org/pipermail/freebsd-arch/2012-February/012410.html I wrote a man page http://www.stack.nl/~jilles/unix/utimensat.2 I think this is close to done; it needs to be updated and re-tested. -- Jilles Tjoelker
Responsible Changed From-To: freebsd-bugs->rwatson Robert, please assign this to whomever is most appropriate. Thanks.
There are various partially complete patches for utimensat() but work seems stalled, it is a pity it failed to get it into 10.0.
I noticed that you had done some work in this area with lemul and I was hoping you could take a look at this and figure out what, if anything, needs to happen.
See also: https://reviews.freebsd.org/D1426 -- Add futimens and utimensat system calls.
futimens() and utimensat() were added to 11-current in SVN r277610.