Scott Lamb <address@hidden> 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, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."