行バッファリングとは?
行バッファリングは、書き込まれた文字をバッファに保持し、改行が出力されるたびにフラッシュする出力モードです。バッファリングなしの出力と大きなブロックバッファリングの中間に位置し、行単位でのタイムリーな可視性を提供します。多くのプログラムは、出力先が端末のときは自動的にこれを使い、出力先がパイプやファイルのときはブロックバッファリングに切り替えます。
なぜ重要か
端末とパイプの違いは、パイプ出力を取り込む CI のログがしばしば遅延したりまとめて届いたりする理由そのものです。行バッファリングを強制すると、対話的に見られるようなリアルタイムの行単位ログが復元されます。
関連ガイド
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…