coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modify buffering of standard streams via environment variables (not


From: wrotycz
Subject: Re: Modify buffering of standard streams via environment variables (not LD_PRELOAD)?
Date: Sun, 21 Apr 2024 00:14:47 +0200
User-agent: GWP-Draft

> Sat, Apr 20, 2024 at 16:45 Carl Edquist wrote:  > > However, stdout 
and stderr are still separate streams even if they refer to the same output 
file/pipe/device, so partial lines are not interleaved in the order that they 
were printed.  >  > will output "abc\n123\n" instead of 
"a1b2c3\n\n", even if you run it as  > $ ./abc123 2>&1 | cat  
 It seems that it's 'interleaved' when buffer is written to a file 
or pipe, and because stdout is buffered it waits until buffer is full or 
flushed, while stderr is not and it doesn't wait and write immediately.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]