Buffering and Blocking The stdio library offers three different buffering policies _IOFBF: Full buffering (typically 4k o 16k) _IOLBF: Line buffering (up to the newline character) _IONBF: No buffering For details, see setvbuf(3) Buffering interferes with pipes (and sockets, and poll/select) If stdin/out are not terminals, the default is _IOFBF So the writing process may not be actually write(2)ing The reading process can block waiting for data that doesn't arrive Interactive use, with grep(1), can be disappointing That's why many commands offer "-l" or force _IONBF Example: using tee to replicate terminals