From: Nobody on
On Wed, 11 Aug 2010 18:49:26 -0700, RG wrote:

> This doesn't explain why "cat | cat" when run interactively outputs
> line-by-line (which it does). STDIN to the first cat is a TTY, but the
> second one isn't.

GNU cat doesn't use stdio, it uses read() and write(), so there isn't any
buffering.

For more complex programs, using unbuffered I/O may not be practical,
due to either code complexity or performance.