coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

`tail` does not exit when pipe is broken

Open theofficialgman opened this issue 2 years ago • 2 comments

gnu coreutils tail implementation exits if the output of tail is piped to another command and that other command exits. coreutils tail -f file | filter

this functionality was added in coreutils 8.28 and a few bugs relating to it were fixed in 8.31.

uutils/coreutils tail does not exit when the piped command exits

theofficialgman avatar Jun 10 '23 00:06 theofficialgman

Hi, do you have a concrete command where the uutils tail does not exit? I tried

coreutils tail -f file.txt | head -n 2

and tail exited normally after printing two lines. But maybe this is not the situation you mean.

fritzrehde avatar Sep 04 '23 13:09 fritzrehde

Closed by mistake, re-opening issue.

cakebaker avatar Jul 10 '25 14:07 cakebaker