On 10/24/2013 07:35 AM, Holger Hans Peter Freyther wrote:
On Tue, Oct 22, 2013 at 12:22:40PM +0200, Jacob
Erlbeck wrote:
+ setlinebuf(stdout);
out of curiosity, why is this needed?
To have a sensible relation between stderr and stdout lines, e.g. when
calling something like:
./tests/gbproxy/gbproxy_test 2>&1 | less
or writing the output to a file. Since by default stderr is unbuffered
and stdout is (possibly) block buffered when not writing to tty. You'd
get chunks of stderr and stdout blobs in this case. See setlinebuf(3)
for details.
Jacob