Hi,
On Mon, Jan 03, 2005 at 12:53:58AM -0800, Paul Eggert wrote:
> > Your change (at 2004-11-23) to src/touch.c introduces regression:
> > On GNU/Linux without futimes syscall and without /proc mounted, futimes()
> > function from glibc returns ENOENT, futimens() from gnulib also returns
> > ENOENT, and touch utility fails.
> > I suggest to modify gnulib's futimens() to fall back to utimes()
> > when futimes() fails this way.
>
> Thanks for reporting that; I installed this patch. Could you please
> give it a try? My GNU/Linux distribution doesn't have this problem.
Yes, this patch surely fixes the problem:
open("f", O_WRONLY|O_NONBLOCK|O_CREAT|O_NOCTTY|O_LARGEFILE, 0666) = 3
utimes("/proc/self/fd/3", NULL) = -1 ENOSYS (Function not implemented)
utime("/proc/self/fd/3", NULL) = -1 ENOENT (No such file or directory)
utimes("f", NULL) = -1 ENOSYS (Function not implemented)
utime("f", NULL) = 0
close(3) = 0
According to documentation, futimes() may also fail with ENOSYS; in this
case, falling back on utimes() also looks reasonable:
> + if (errno != ENOENT)
+ if (errno != ENOSYS && errno != ENOENT)
--
ldv