On Wed, 10 Jul 2013 10:31:38 -0400, Gerhard Postpischil wrote:

>On 7/10/2013 10:03 AM, Elardus Engelbrecht wrote:
>
>> It should work for Paul Gilmartin. But I find it still *strange* that
>> output from ONE loop is arranged by type of output medium, not by
>> execution sequence.
>> 
I have dealt with some implementations of "awk" which output
unbuffered when stdout is a terminal; buffered when not a
terminal.  Almost well-motivated, but frustrating when awk is a
producer in a pipeline and I want to see the output in real time.
Apparently awk deems a pipe not-a-terminal and buffers.
Better the distinction should be made between regular files
and character special files.

>> But I believe from my fading memory that stderr are shown usually
>> before stdout due to priority, but I could be wrong.
> 
And a motivation not to delay error messages nor to require an
fflush() for each.

>It appears that each file gets its own buffer(s), and those are written
>
I should hope it wouldn't be otherwise.

>when full or closed. PG's output is too short and small to show the
>interleaving.
>
My ten-line example sufficed to show a difference in interleaving
between EBCDIC and Enhanced ASCII output, but certainly not to
demonstrate steady-state behavior.  Hmmm... I wonder if stderr
is buffered in ASCII mode?

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to