[hackers] [sbase] tail: Ignore anything other than FIFOs and regular files for -f || sin
commit c641d38d420ca9272f1ca52fd062b602bc6fa710
Author: sin <sin_AT_2f30.org>
Date: Mon Feb 9 15:03:35 2015 +0000
tail: Ignore anything other than FIFOs and regular files for -f
diff --git a/tail.c b/tail.c
index 11af1dd..e244930 100644
--- a/tail.c
+++ b/tail.c
_AT_@ -101,6 +101,8 @@ main(int argc, char *argv[])
newline ? "\n" : "", argv[0]);
if (stat(argv[0], &st1) < 0)
eprintf("stat %s:", argv[0]);
+ if (!(S_ISFIFO(st1.st_mode) || S_ISREG(st1.st_mode)))
+ fflag = 0;
newline = 1;
tail(fp, argv[0], n);
Received on Mon Feb 09 2015 - 16:25:08 CET
This archive was generated by hypermail 2.3.0
: Mon Feb 09 2015 - 16:36:17 CET