tail: Ignore anything other than FIFOs and regular files for -f
This commit is contained in:
parent
a25a57f6ac
commit
124cb7415a
2
tail.c
2
tail.c
@ -101,6 +101,8 @@ main(int argc, char *argv[])
|
|||||||
newline ? "\n" : "", argv[0]);
|
newline ? "\n" : "", argv[0]);
|
||||||
if (stat(argv[0], &st1) < 0)
|
if (stat(argv[0], &st1) < 0)
|
||||||
eprintf("stat %s:", argv[0]);
|
eprintf("stat %s:", argv[0]);
|
||||||
|
if (!(S_ISFIFO(st1.st_mode) || S_ISREG(st1.st_mode)))
|
||||||
|
fflag = 0;
|
||||||
newline = 1;
|
newline = 1;
|
||||||
tail(fp, argv[0], n);
|
tail(fp, argv[0], n);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user