]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r226403:
authortrociny <trociny@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 21 Oct 2011 05:40:30 +0000 (05:40 +0000)
committertrociny <trociny@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 21 Oct 2011 05:40:30 +0000 (05:40 +0000)
commitcf852f61e9475ec876c2d23823dad2901b989313
tree0be05344aae7bf6c59b8b8aae27800965a654bf4
parent63504e1e890c2457e500e8e0696b49b6fa273ea4
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>

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