]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r329606:
authorasomers <asomers@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 16 Apr 2018 16:42:16 +0000 (16:42 +0000)
committerasomers <asomers@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 16 Apr 2018 16:42:16 +0000 (16:42 +0000)
commitf0e82c50eacef99bd1d285aa5cefd0be929bb777
treedd527aaeea94b84e3fdabfc19038984192abc2f7
parente2e9f01c9712c90093506f46b6a3a648e8338edc
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@332610 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.bin/tail/reverse.c
usr.bin/tail/tests/tail_test.sh