On 7/7/2011 8:48 AM, Andreas Schwab wrote:
"Steven W. Orr"<ste...@syslang.net> writes:
But, I actually do get line buffered IO.
No, you don't.
I get the stdout stuff as it happens, and the stderr stuff when that
happens.
Every process flushes its output when it exits.
If you run this program locally, it does the same thing. BUT! if you
run it remotely, the two channels all block up till program exit and
it all comes out in one squirt.
There is nothing that flushes the output before the process exits.
(Nothing of this has anything to do with the shell.)
Andreas.
Ok. Let me see how to explain this better. If I change the cat command that
uses a here file to a builtin echo command, it behaves the same way. I get the
output in two squirts regardless of whether I run from a console or remotely.
I just discovered that python has a -u option that will cause all io to be
unbuffered, even if there's no console.
So, why is it that bash is behaving like it is always line buffered or
unbuffered, even if there is no console?
--
Time flies like the wind. Fruit flies like a banana. Stranger things have .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net