Roberto Nibali <[EMAIL PROTECTED]> writes:

> if I run those commands on a DRDB mounted partition, I get a
> EX_IOERR for normal tail and this assertion failed for a tail -f
> plus an EX_IOERR.

Thanks for reporting the problem.  Part of the problem is that your
DRDB mounted partition is returning I/O errors on large files for some
reason.  This is not a bug in "tail"; it is a bug or other problem
with your file system.  You can investigate this further by using
"strace tail -f file" and looking at the system calls it executes.

But the other problem is a bug in "tail": it should not report
an assertion failure, even if there is an I/O error when reading
its input data.  I installed this patch to CVS coreutils:

2004-12-03  Paul Eggert  <[EMAIL PROTECTED]>

        * src/tail.c (tail_file): Set errnum to -1 if the initial "tail"
        failed.  This works around an assertion failure reported by
        Roberto Nibali in:
        http://lists.gnu.org/archive/html/bug-coreutils/2004-12/msg00012.html

--- src/tail.c  28 Sep 2004 06:34:22 -0000      1.230
+++ src/tail.c  4 Dec 2004 07:02:35 -0000       1.231
@@ -1317,7 +1317,7 @@ tail_file (struct File_spec *f, uintmax_
             call made the window big enough to exercise the problem.  */
          sleep (1);
 #endif
-         f->errnum = 0;
+         f->errnum = ok - 1;
          if (fstat (fd, &stats) < 0)
            {
              ok = false;


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to