What Is Line Buffering?
Line buffering is an output mode that holds written characters in a buffer and flushes them whenever a newline is emitted. It is a middle ground between unbuffered output and large block buffering, giving timely line-by-line visibility. Many programs use it automatically when their output goes to a terminal but switch to block buffering when it goes to a pipe or file.
Why it matters
The terminal-versus-pipe difference is exactly why CI logs, which capture piped output, often lag or arrive in bursts. Forcing line buffering restores the real-time, line-by-line logs you would see interactively.
Related guides
What Is Buffered Output?Buffered output collects written data in memory and flushes it in larger chunks, improving efficiency but del…
What Is a Pseudo Terminal?A pseudo terminal is a software pair that emulates a hardware terminal, letting programs that expect a termin…
What Is a Controlling Terminal?A controlling terminal is the terminal associated with a session that delivers keyboard signals and identifie…