commit c641d38d420ca9272f1ca52fd062b602bc6fa710
Author: sin <[email protected]>
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
@@ -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);
 

Reply via email to