Re: BASH Redirect (STDOUT & STDERR) Syncing
In article <[🔎] m3r7hgb1ai.fsf@caruso.quasi.local>,
Bruno Hertz <brrhtz@yahoo.de> wrote:
>Especially regarding block buffering, if a program doesn't take extra
>measures it's buffering strategy will usually be governed by the
>standard library, i.e. glibc. And in that case the only possible
>reason for differing behavior on different platforms could only be
>some config option given to glibc, presumably during compilation time,
>targeting e.g. the buffer size. This may be possible, but at least I'm
>not aware of Debian doing something special in that regard and can't
>myself really say that Sarge behaves any different than, say, FC3.
>
>Maybe somebody else knows more ?
Standard output is line-buffered if the output is a terminal,
block-buffered otherwise.
Standard error is always line-buffered.
I've seen this behaviour on many Unix (-like) systems.
A program can change this behaviour at runtime, ofcourse - for
C programs, see "man setvbuf", for perl, check out the "$|" variable.
Mike.
Reply to: