]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r329606:
authorasomers <asomers@FreeBSD.org>
Mon, 16 Apr 2018 16:20:39 +0000 (16:20 +0000)
committerasomers <asomers@FreeBSD.org>
Mon, 16 Apr 2018 16:20:39 +0000 (16:20 +0000)
commit9e595cf5cad14d280ffe3fb716a1272b79d5db81
tree134d321c66dec8b7dd815ab669e246fa058de8f5
parent864e28aa0a788019c3bf6fbd2f29ea706edebb30
MFC r329606:

tail: fix "tail -r" for piped input that begins with '\n'

A subtle logic bug, probably introduced in r311895, caused tail to print the
first two lines of piped input in forward order, if the very first character
was a newline.

PR: 222671
Reported by: Jim Long <freebsd-bugzilla@umpquanet.com>, pprocacci@gmail.com
Sponsored by: Spectra Logic Corp
usr.bin/tail/reverse.c
usr.bin/tail/tests/tail_test.sh