[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24903: "tail -f - foo" does not terminate when stdin is closed and f
From: |
Pádraig Brady |
Subject: |
bug#24903: "tail -f - foo" does not terminate when stdin is closed and foo is ignored |
Date: |
Tue, 8 Nov 2016 17:47:15 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
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 end of this type of file; giving up on this name
> $ jobs
> [1]+ Running echo "bar" | tail -f - foo &
Yes we should exit here.
> $ readlink /proc/16386/fd/0
> pipe:[162156]
> $ lsof | grep 162156
> tail 16386 user 0r FIFO 0,10 0t0
> 162156 pipe
>
> Only the reading end of the pipe is still open, thus tail should not be
> able to read any more bytes from it.
Right we're not blocked on read()
The attached should fix it up.
thanks,
Pádraig.
p.s. These Symbolic Execution techniques are intriguing.
Have you any more details.
tail-f-ignore.patch
Description: Text Data