|
From: | Matthew Woehlke |
Subject: | Re: bash: no job control in this shell |
Date: | Thu, 28 Jun 2007 16:14:10 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070509 Thunderbird/1.5.0.12 Mnenhy/0.7.4.0 |
Bob Proulx wrote:
JimK wrote:Which initially I didn't think really mattered, but I just found out that man/less/more do not work after displaying their initial screen. Commands like "q" are not processed like they should so you are stuck inside of man/less/more.You would probably need "q\n" in order to get the data flushed to the subprocess. This is probably a stdio buffering issue. When the stdio library determines that the output is not a tty then the output isbuffered into large blocks for performance reasons.
That doesn't sound right, wouldn't an fflush be better? The '\n' might have undesired side effects.
If the output is a tty then buffering is disabled. (I can't remember if buffering is off or line buffered when the output is a tty.)
By default, stdout on a tty is line buffered and stderr is not buffered. At least, to the best of my knowledge :-).
-- Matthew "Let's call it an accidental feature." -- Larry Wall
[Prev in Thread] | Current Thread | [Next in Thread] |