[EMAIL PROTECTED] rob $ echo foo|tail -f
foo
tail: standard input: file truncated
tail: standard input: cannot seek to offset 0: Illegal seek

The attached patch fixes this behaviour and allows tail to read from
fifos properly without dieing.

Cheers,

Rob

-- 
rob holland - [ [EMAIL PROTECTED] ]
[ 5251 4FAC D684 8845 5604  E44F D65C 392F D91B 4729 ]
--- coreutils-5.2.1/src/tail.c  2004-01-21 22:27:02.000000000 +0000
+++ ./tail.c    2004-07-18 13:44:23.797293952 +0000
@@ -1033,7 +1033,7 @@
          /* reset counter */
          f[i].n_unchanged_stats = 0;
 
-         if (stats.st_size < f[i].size)
+         if (!S_ISFIFO(stats.st_mode) && (stats.st_size < f[i].size))
            {
              error (0, 0, _("%s: file truncated"), pretty_name (&f[i]));
              last = i;

Attachment: pgpcKFORyv7n8.pgp
Description: PGP signature

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

Reply via email to