<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Process Execution on Nalar</title>
    <link>https://nalar.dev/tags/process-execution/</link>
    <description>Recent content in Process Execution on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 17 Sep 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/process-execution/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>O_CLOEXEC Closes Descriptors Atomically Across exec</title>
      <link>https://nalar.dev/o-cloexec-closes-descriptors-atomically-across-exec/</link>
      <pubDate>Thu, 17 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://nalar.dev/o-cloexec-closes-descriptors-atomically-across-exec/</guid>
      <description>&lt;p&gt;A file descriptor created without close-on-exec state can escape into a newly executed program during a narrow concurrency window. In a multithreaded Linux process, setting &lt;code&gt;FD_CLOEXEC&lt;/code&gt; with a later &lt;code&gt;fcntl()&lt;/code&gt; call leaves that window open between descriptor creation and the flag update.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;O_CLOEXEC&lt;/code&gt; removes the split operation. The kernel creates the descriptor with its close-on-exec flag already set, so another thread cannot observe an intermediate state in which the descriptor exists but remains inheritable across a successful &lt;code&gt;execve()&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
