On Wed, Aug 17, 2011 at 6:42 PM, Philip Guenther <[email protected]> wrote: > The diff below adds support to various utilities to preserve timestamps to > the nanosecond. Most of them already preserve down to microseconds and > this just makes them preserve the nanoseconds part too. That might seem > pointless but failure to do that can confuse programs when, for example, > "cp -p" leaves the output file as *older* than the input after the bottom > bits of the timestamp get zeroed.
I like this for the simplification. I'm slightly hesitant to make base rely on utimensat(2) just yet though, because systrace(1) can't handle it yet. The futimens(2) changes should be fine though. I think cron or crontab had some code that could be similarly cleaned up too. Re systrace, the complication isn't just that the path names are interpreted relative to a directory fd; systrace(1) already supports adding filters that need to examine two arguments at once (though they're rare, so it's kinda kludgy). The more obnoxious part is that some of the functions take a *third* argument to specify whether or not to follow symbolic links, and then their behavior isn't even consistent there (e.g., utimensat(2) optionally takes AT_SYMLINK_NOFOLLOW while linkat(2) takes AT_SYMLINK_FOLLOW). I don't think any of this is show stopping though, just tedious.
