bug#78910: tail does not support -r added by POSIX.1-2024

Eric Blake via GNU coreutils Bug Reports <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <b6pxikexxhktjl2l5amzcki4xa73so2dsszonzzzb2ddlifs6z@7bgn6ex3yvyh>
On Tue, Jul 01, 2025 at 07:07:45PM +0200, Bernhard Voelker wrote:
> On 6/28/25 00:21, Pádraig Brady wrote:
> > I wouldn't be rushing to implement it TBH.
> 
> Furthermore, -r clashes with the existing -f,--follow ... hence it's even more
> surprising that POSIX does not specify what should happen for those logically
> conflicting modes.

Remember, the POSIX synopsis lines lists two distinct invocation
styles:

tail [-f] [-c number|-n number] [file]
tail -r [-n number] [file]

which means undefined behavior from the POSIX point of view if -f and
-r are ever attempted at the same time.  Therefore, whatever GNU
decides to do on that combo (preferably, diagnose it early with an
error and exit, since I can't figure out anything else useful it could
do) will not violate POSIX.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.