I've read that when redirecting
stderr to the same file using
stdout is usually block buffered while
stderr is unbuffered.
If a very long line is written to
stdout, requiring two separate flushes of the buffer, could it happen that a line from
stderr slips in the middle? Something like this:
stdout: aaaaaaaa.....really long line......aaaaaaaaaaaa<newline> stderr: eee<newline> combined: aaaaaaaaaaaaaaaaeee<newline> aaaaaaa<newline>