[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I: coreutils-20041123: src/touch.c regression
From: |
Dmitry V. Levin |
Subject: |
Re: I: coreutils-20041123: src/touch.c regression |
Date: |
Mon, 3 Jan 2005 15:27:57 +0300 |
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
pgpYE1UF8P8Az.pgp
Description: PGP signature
- Re: I: coreutils-20041123: src/touch.c regression, Paul Eggert, 2005/01/03
- Re: I: coreutils-20041123: src/touch.c regression,
Dmitry V. Levin <=
- Re: I: coreutils-20041123: src/touch.c regression, Jim Meyering, 2005/01/03
- Re: I: coreutils-20041123: src/touch.c regression, Paul Eggert, 2005/01/03
- Re: I: coreutils-20041123: src/touch.c regression, Jim Meyering, 2005/01/03
- Re: I: coreutils-20041123: src/touch.c regression, Paul Eggert, 2005/01/03
- Re: I: coreutils-20041123: src/touch.c regression, Jim Meyering, 2005/01/04
- Re: I: coreutils-20041123: src/touch.c regression, Paul Eggert, 2005/01/04