KDOC 279: パイプのバッファはいっぱいになるとwriteをブロックする

この文書のステータス

  • 作成
    • 2024-11-09 貴島
  • レビュー
    • 2024-11-14 貴島

概要

パイプのバッファはいっぱいになるとwriteをブロックする。マニュアルの該当箇所を示す。

man "pipe(7)" | grep -A 7 "Pipe capacity"
Pipe capacity
    A  pipe  has  a limited capacity.  If the pipe is full, then a write(2)
    will block or fail, depending on whether the  O_NONBLOCK  flag  is  set
    (see  below).   Different implementations have different limits for the
    pipe capacity.  Applications should not rely on a particular  capacity:
    an  application  should  be designed so that a reading process consumes
    data as soon as it is available, so that a writing process does not re‐
    main blocked.

関連