<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>PIPE_BUF on Nalar</title>
    <link>https://nalar.dev/tags/pipe_buf/</link>
    <description>Recent content in PIPE_BUF on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 01 Jan 0001 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/pipe_buf/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>PIPE_BUF Bounds Atomic Pipe Writes, Not Pipe Capacity</title>
      <link>https://nalar.dev/pipe_buf-bounds-atomic-pipe-writes-not-pipe-capacity/</link>
      <pubDate>Thu, 17 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/pipe_buf-bounds-atomic-pipe-writes-not-pipe-capacity/</guid>
      <description>&lt;p&gt;A Linux pipe can have tens of kilobytes of buffer capacity while guaranteeing atomic writes only up to &lt;code&gt;PIPE_BUF&lt;/code&gt;. These limits describe different properties: capacity controls buffered occupancy, while &lt;code&gt;PIPE_BUF&lt;/code&gt; controls whether concurrent writers can interleave a write request.&lt;/p&gt;&#xA;&lt;p&gt;Conflating the two creates fragile framing protocols. A message can fit in the pipe&amp;rsquo;s available storage and still exceed the atomicity boundary.&lt;/p&gt;&#xA;&lt;h2 id=&#34;atomicity-applies-to-one-write-request&#34;&gt;Atomicity Applies to One Write Request&lt;/h2&gt;&#xA;&lt;p&gt;POSIX defines a pipe write of at most &lt;code&gt;PIPE_BUF&lt;/code&gt; bytes as atomic with respect to other writers. On Linux, &lt;code&gt;PIPE_BUF&lt;/code&gt; is 4096 bytes.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
