stdout and stderr are getting mixed up?

Joel Sherrill joel at
Tue Jul 4 05:41:16 UTC 2017

On Jul 4, 2017 12:07 AM, "Chris Johns" <chrisj at> wrote:

On 04/07/2017 15:01, Sebastian Huber wrote:
> I get the mixed output also on FreeBSD.

I wonder if what we see when mixing stdout and stderr onto the same device
something related to the implementation of the drivers.

FILE * is layered on top of system calls. If the FILE is line buffered, I
think the POSIX intent is to call write() once per line. Otherwise, it
could be calling write() an arbitrary number of times.

I wonder if the line buffer (setbuf) implementation and termios are
interacting to cause this difference between the various OSes.

users mailing list
users at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list