]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r226403:
authortrociny <trociny@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 21 Oct 2011 05:37:40 +0000 (05:37 +0000)
committertrociny <trociny@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 21 Oct 2011 05:37:40 +0000 (05:37 +0000)
commit9555ce8fda67072817b18abd01fbe7f4bbb6b3d8
tree0138fd75fb52d222cdf4117786f7186cca125689
parent46047d834c404492daf91a81846be2302d52e941
MFC r226403:

In r225809 the intention was to send VEOF only once if STDIN was not a
terminal. Unfortunately the fix was incorrect and for flushtime > 0 it
keept sending VEOF.

Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
in bin/161526. Note, we still send VEOF at least once. Otherwise
commands like below would hang forever:

  echo 1 |script /tmp/script.out cat

PR: bin/161526
Reported by: Adrian Wontroba <aw1@stade.co.uk>, Stefan Bethke <stb@lassitu.de>
Tested by: Stefan Bethke <stb@lassitu.de>
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226591 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.bin/script/script.c