Olivier Galibert <galibert(a)pobox.com> writes:
On Mon, Oct 19, 1998 at 06:54:53PM -0400, Greg Klanderman wrote:
> Anyway the question is, if I redirect stdout and stderr as follows
> (in /bin/sh):
>
> % some_command > output.txt 2>&1
>
> am I guaranteed that output to stdout and stderr by the program is
> synchronized? Do the two output streams share the same buffer?
No. Stdio internal buffers aren't synchronized no matter what you
externally do.
and, in any case, I believe that stderr is unbuffered in most
implementations and stdout is buffered. So its particularly nasty.
Soren