On 11/09/17 01:52, Andrey Utkin wrote:
> Hi,
> 
> Seems tail from coreutils 8.27 (as installed by Gentoo) doesn't handle
> the usecase of following more than one i/o stream or pipe file, e.g.
> 
> tail -F -c +0 \
>       <(while true; do date;     sleep 1; done) \
>       <(while true; do date +%s; sleep 1; done)
> 
> Prints output of just first sub-script.
> 
> This has been described at length here:
> 
> https://superuser.com/questions/1243634/how-to-tail-multiple-pipe-files-or-streams
> 
> Is it really a bug? Or is my expectation wrong? If that's bug, I am
> happy to file a proper bugreport and maybe even debug it and make a
> patch.

I confirmed the latest version has the same behavior,
with and without inotify.
I''ve not dug in, but I presume it's because tail will read the full
file up front (to get to the tail of it), and so will continue to
read from the first, before it considers subsequent files.
I don't know off the top of my head how to support this use case.
There was a related warning that was adjusted recently.
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.27-43-gaab875a
We might adjust that to fire in more cases like this mulitple pipe case?

cheers,
Pádraig



Reply via email to