<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Fcntl on Nalar</title>
    <link>https://nalar.dev/tags/fcntl/</link>
    <description>Recent content in Fcntl on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 23 Sep 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/fcntl/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>fcntl OFD Locks Follow Open File Descriptions Instead of Processes</title>
      <link>https://nalar.dev/fcntl-ofd-locks-follow-open-file-descriptions/</link>
      <pubDate>Wed, 23 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://nalar.dev/fcntl-ofd-locks-follow-open-file-descriptions/</guid>
      <description>&lt;p&gt;Traditional POSIX record locks have a property that can surprise code with several descriptors for the same file: lock ownership is associated with the process, and closing a descriptor for that file can release the process&amp;rsquo;s locks on it. Linux open file description locks move ownership to the kernel open file description referenced by a descriptor.&lt;/p&gt;&#xA;&lt;p&gt;The interface still uses &lt;code&gt;fcntl()&lt;/code&gt; and &lt;code&gt;struct flock&lt;/code&gt;, but the ownership boundary changes. &lt;code&gt;F_OFD_SETLK&lt;/code&gt;, &lt;code&gt;F_OFD_SETLKW&lt;/code&gt;, and &lt;code&gt;F_OFD_GETLK&lt;/code&gt; make byte-range locking track the open file description rather than the process identity.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
