tail: only use inotify with regular files
commit18f6b22fe1eb4447b26fafd3bed1e6bb23c9adc2
authorPádraig Brady <P@draigBrady.com>
Sat, 17 Jun 2017 06:50:47 +0000 (16 23:50 -0700)
committerPádraig Brady <P@draigBrady.com>
Sat, 17 Jun 2017 21:50:04 +0000 (17 14:50 -0700)
tree89c6c5dbadd963628dd133be46879d5516bda2a4
parentaab875a40b61711077e90be904c9977b47931ec3
tail: only use inotify with regular files

* src/tail.c (any_non_regular): A new function to check passed files.
(main): Use the above to skip inotify if any non regular files passed
like /dev/tty or /dev/ttyUSB0 etc.
* tests/tail-2/inotify-only-regular.sh: A new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the bug fix.
Fixes http://bugs.gnu.org/21265 and http://bugs.gnu.org/27368
NEWS
src/tail.c
tests/local.mk
tests/tail-2/inotify-only-regular.sh [new file with mode: 0755]