]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tail: detect closed stdout on Solaris
authorPádraig Brady <P@draigBrady.com>
Wed, 13 Apr 2022 16:31:47 +0000 (17:31 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 13 Apr 2022 19:10:14 +0000 (20:10 +0100)
commit87d5f1e17e32176b262a13262ac3ec16e1970596
tree9d2da1cd8f3f235078d68d8a99ac8d0117dd82f3
parent48e15cef45de108c803fd090e3123043da5f0a01
tail: detect closed stdout on Solaris

* src/tail.c (check_output_alive): Use poll() on Solaris.
Also handle POLLHUP, which Solaris returns in this case.
* tests/tail-2/pipe-f.sh: Use `head -n2` rather than `sed 2q`
as Solaris sed does not exit in this case.
* NEWS: Mention the improvement.
Reported by Bruno Haible.
NEWS
src/tail.c
tests/tail-2/pipe-f.sh