bug#24903: "tail -f - foo" does not terminate when stdin is closed and foo is ignored

2016-11-18 Thread Julian Büning
On 11/08/2016 06:47 PM, Pádraig Brady wrote: p.s. These Symbolic Execution techniques are intriguing. Have you any more details. Thanks for your interest in our techniques. Symbolic Execution is a dynamic analysis method to automatically find bugs by executing a program with symbolic inputs,

bug#24903: "tail -f - foo" does not terminate when stdin is closed and foo is ignored

2016-11-08 Thread Bernhard Voelker
On 11/09/2016 12:44 AM, Bernhard Voelker wrote: > and even more strange: when 'missing_file' then appears > later, tail doesn't terminate when both files are removed: oops, forget about this: we're following by descriptor, and tail can not know if the file is still opened by other processes.

bug#24903: "tail -f - foo" does not terminate when stdin is closed and foo is ignored

2016-11-08 Thread Bernhard Voelker
On 11/09/2016 12:19 AM, Pádraig Brady wrote: > + tail -f - 'untailable file' will now terminate when there is no more data > + to read from stdin. Previously it behaved as if --retry was specified. > + [This bug was present in "the beginning".] LGTM, thanks. > BTW I see a related issue with

bug#24903: "tail -f - foo" does not terminate when stdin is closed and foo is ignored

2016-11-08 Thread Pádraig Brady
On 08/11/16 21:28, Bernhard Voelker wrote: > On 11/08/2016 06:47 PM, Pádraig Brady wrote: >> Subject: [PATCH] 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

bug#24903: "tail -f - foo" does not terminate when stdin is closed and foo is ignored

2016-11-08 Thread Bernhard Voelker
On 11/08/2016 06:47 PM, Pádraig Brady wrote: > Subject: [PATCH] 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. > *

bug#24903: "tail -f - foo" does not terminate when stdin is closed and foo is ignored

2016-11-08 Thread Pádraig Brady
On 08/11/16 16:39, Julian Büning wrote: > We observed another behavior possibly related to bug #24495: Similar yes. > $ mkdir foo > $ echo "bar" | tail -f - foo & > [1] 16386 > ==> standard input <== > bar > > ==> foo <== > tail: error reading 'foo': Is a directory > tail: foo: cannot follow

bug#24903: "tail -f - foo" does not terminate when stdin is closed and foo is ignored

2016-11-08 Thread Julian Büning
We observed another behavior possibly related to bug #24495: $ mkdir foo $ echo "bar" | tail -f - foo & [1] 16386 ==> standard input <== bar ==> foo <== tail: error reading 'foo': Is a directory tail: foo: cannot follow end of this type of file; giving up on this name $ jobs [1]+ Running