Subject: Re: bug#13498: "cut -f" lags a line

From: Andreas Schwab <[email-masked]>
Date: Sat, 19 Jan 2013 21:04:59 +0100

Scott Lamb <[email-masked]> writes:

> I don't know exactly why the behavior differs based on stdin being a
> tty or not. My best guess is that glibc might have some logic that, if
> stdin is a tty, automatically flushes stdout any time the program
> blocks on stdin.

When a new buffer is read for a line buffered or unbuffered stream,
stdout is flushed.  This is traditional Unix behaviour, but AFAIK not
required by any standard.

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."