tail: terminate when following pipes and untailable non pipes
commit2a809125299261db9db9b97e93b5885223c6e9d3
authorPádraig Brady <P@draigBrady.com>
Tue, 8 Nov 2016 17:34:44 +0000 (8 17:34 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 8 Nov 2016 23:19:08 +0000 (8 23:19 +0000)
tree5940d90ba24dfa28c8715a99bea76f57193e6415
parent23066be1b655fd81542761161c4f7ef37dc0813b
tail: terminate when following pipes and untailable non pipes

* src/tail.c (ignore_pipe_or_fifo): Mark the descriptor as -1
for pipes so that any_live_files() detects correctly that
the entry is no longer live.
* tests/tail-2/pipe-f.sh: Add a test case.
* NEWS: Mention the fix.
Fixes http://bugs.gnu.org/24903 which was detected
using Symbolic Execution techniques developed in
the course of the SYMBIOSYS research project at
COMSYS, RWTH Aachen University.
NEWS
src/tail.c
tests/tail-2/pipe-f.sh