elm 2.5.3 and glibc 2.1.93
H . J . Lu
hjl@lucon.org
Thu Sep 21 21:16:00 GMT 2000
With glibc 2.1.93, I got
# elm
Cannot lock folder - giving up. Please try again in a few minutes.
>From strace, I got
open("/var/spool/mail/hjl", O_RDWR) = 4
fcntl64(4, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = -1 ENOSYS (Function not implemented)
fcntl(4, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
write(1, "\33[?1l\33>", 7^[[?1l^[>) = 7
write(1, "\33[24;1H\r\n", 9^[[24;1H^M) = 9
write(1, "\33[2J\33[?47l\0338", 12^[[2J^[[?47l^[8) = 12
ioctl(0, SNDCTL_TMR_STOP, {B9600 opost isig icanon echo ...}) = 0
write(2, "Cannot lock folder - giving up. "..., 67Cannot lock folder - giving up. Please try again in a few minutes.) = 67
It looks like elm 2.5.3 may check errno even when fcntl returns 0. I
believe it is a glibc bug. Here is my patch. Someone please double
check if there are any more functions like that need fix.
Thanks.
H.J.
--- /work/gnu/import/libc/sysdeps/unix/sysv/linux/i386/fcntl.c Thu Sep 7 08:45:36 2000
+++ ./fcntl.c Thu Sep 21 21:15:25 2000
@@ -50,10 +50,13 @@ __libc_fcntl (int fd, int cmd, ...)
# ifdef __NR_fcntl64
if (! __have_no_fcntl64)
{
+ int saved_errno = errno;
int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
+
if (result >= 0 || errno != ENOSYS)
return result;
+ __set_errno (saved_errno);
__have_no_fcntl64 = 1;
}
# endif
More information about the Libc-hacker
mailing list