]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tail(1): Do not print bogus errno string
authorConrad Meyer <cem@FreeBSD.org>
Fri, 1 Sep 2017 22:37:49 +0000 (22:37 +0000)
committerConrad Meyer <cem@FreeBSD.org>
Fri, 1 Sep 2017 22:37:49 +0000 (22:37 +0000)
commitb2b1603e173e599ad7e487d5640c87fbb027be00
tree001b2e864928bd38dfa900f1cb49ed81dc1be172
parentfe8b4983b4f200c479846839b2632024136c0ff4
tail(1): Do not print bogus errno string

In the case where write(2) does not return -1, it does not initialize errno.
This can happen when a broken pipe causes a short write.

I attempted to adapt the submitted test case to ATF but could not figure out
how to make the test run in the ATF environment.  So the aborted test is
left disabled, in case someone would like to run it manually or fix it.

PR: 221976
Submitted by: <martin AT lispworks.com> (earlier version)
Sponsored by: Dell EMC Isilon
usr.bin/tail/extern.h
usr.bin/tail/tests/tail_test.sh