<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Programming on Fran Kuo | R&amp;D Leadership</title>
    <link>https://chenfu.ai/en/tags/programming/</link>
    <description>Recent content in Programming on Fran Kuo | R&amp;D Leadership</description>
    <generator>Hugo -- 0.157.0</generator>
    <language>en</language>
    <lastBuildDate>Wed, 19 Sep 2007 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://chenfu.ai/en/tags/programming/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>[R&amp;D Notes] Implementing Linux Daemons in Embedded Systems</title>
      <link>https://chenfu.ai/en/posts/%E5%B7%A5%E4%BD%9C%E9%BB%9E%E6%BB%B4-daemon%E6%87%89%E7%94%A8%E6%96%BClinux%E5%B5%8C%E5%85%A5%E5%BC%8F%E7%B3%BB%E7%B5%B1%E5%AF%A6%E4%BD%9C/</link>
      <pubDate>Wed, 19 Sep 2007 00:00:00 +0000</pubDate>
      <guid>https://chenfu.ai/en/posts/%E5%B7%A5%E4%BD%9C%E9%BB%9E%E6%BB%B4-daemon%E6%87%89%E7%94%A8%E6%96%BClinux%E5%B5%8C%E5%85%A5%E5%BC%8F%E7%B3%BB%E7%B5%B1%E5%AF%A6%E4%BD%9C/</guid>
      <description>&lt;p&gt;Implementing Daemons in Embedded Linux systems is a fundamental task for long-running services. Based on the excellent &lt;em&gt;Linux Daemon Writing HOWTO&lt;/em&gt; by Devin Watson, I have refactored several processes in my current project to run as background services (daemons).&lt;/p&gt;
&lt;p&gt;By backgrounding these processes, we ensure they remain resident in the system without blocking the console or being tied to a specific session.&lt;/p&gt;
&lt;h3 id=&#34;core-implementation-pattern&#34;&gt;Core Implementation Pattern&lt;/h3&gt;
&lt;p&gt;The following C snippet demonstrates the standard procedure for &amp;ldquo;daemonizing&amp;rdquo; a process: &lt;code&gt;fork()&lt;/code&gt; from the parent, create a new session with &lt;code&gt;setsid()&lt;/code&gt;, change the working directory, and close standard file descriptors.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Practical Daemon Implementation in Embedded Linux</title>
      <link>https://chenfu.ai/en/posts/linux-daemon-implementation-embedded-systems/</link>
      <pubDate>Wed, 19 Sep 2007 00:00:00 +0000</pubDate>
      <guid>https://chenfu.ai/en/posts/linux-daemon-implementation-embedded-systems/</guid>
      <description>&lt;p&gt;For anyone working with Linux, the concept of a &amp;ldquo;Daemon&amp;rdquo; (or service) is fundamental. Daemons are background processes that operate independently of any active user session. I recently deep-dived into this topic via Devin Watson&amp;rsquo;s &lt;em&gt;Linux Daemon Writing HOWTO&lt;/em&gt;, which provides a fantastic primer and a clear template.&lt;/p&gt;
&lt;p&gt;Building on that foundation, I refactored several processes in my current project to run as persistent background services. Below is a code snippet demonstrating the core structural requirements for a Linux daemon:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
