<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Nohup on Margrop Blog</title>
    <link>https://blog.margrop.net/en/tag/nohup/</link>
    <description>Recent content in Nohup on Margrop Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-US</language>
    <lastBuildDate>Mon, 01 Jun 2026 07:00:00 +0800</lastBuildDate>
    <atom:link href="https://blog.margrop.net/en/tag/nohup/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Your Background Process Keeps Dying After Shell Exit? Stop Blaming nohup — Understand setsid and Unix Process Lifecycle</title>
      <link>https://blog.margrop.net/en/post/setsid-daemon-process-survival/</link>
      <pubDate>Mon, 01 Jun 2026 07:00:00 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/setsid-daemon-process-survival/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;The short version&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;You launched a background service. You used &lt;code&gt;nohup&lt;/code&gt;. You added &lt;code&gt;&amp;amp;&lt;/code&gt;. You redirected output. Everything looked fine. But when you closed the terminal, disconnected SSH, or—more insidiously—when an automation tool finished executing its script, the process silently vanished. You checked &lt;code&gt;ps&lt;/code&gt;—nothing. You checked the port—nothing. No error in the logs. If this has happened to you, you&amp;rsquo;re not alone.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;The root cause isn&amp;rsquo;t SIGHUP—at least, not entirely. The real issue is process group and session membership.&lt;/strong&gt; &lt;code&gt;nohup&lt;/code&gt; merely tells the process to ignore the SIGHUP signal, but the process still belongs to the same session and process group as the parent shell. When the shell exits and sends SIGHUP to the entire process group, &lt;code&gt;nohup&lt;/code&gt; helps—but only if the signal delivery chain stops there. If the controlling terminal is destroyed, if stdin/stdout pipes break, or if the parent&amp;rsquo;s process group is collectively reaped, the process can still die. The proper fix is &lt;code&gt;setsid&lt;/code&gt;: it creates a brand-new session, detaches from the controlling terminal, and places the process in its own process group—so SIGHUP from the parent shell never reaches it in the first place.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This post is based on a real debugging session of the CLIProxyAPI service. The service was started with &lt;code&gt;nohup&lt;/code&gt; but kept disappearing every time an automation script finished. The management panel kept showing &amp;ldquo;connection failed.&amp;rdquo; The culprit turned out to be a subtle Unix process lifecycle issue. This class of problem is common in cloud dev machines, CI runners, SSH jump hosts, and containerized workflows, but it&amp;rsquo;s often misdiagnosed because the underlying process model is poorly understood.&lt;/p&gt;&#xA;&lt;p&gt;All private details have been removed. No real internal addresses, tokens, or paths appear in this article.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Frp Client on CentOS with SSH Access</title>
      <link>https://blog.margrop.net/en/post/centos-install-frp-client-for-ssh/</link>
      <pubDate>Sat, 23 Jan 2021 17:22:58 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/centos-install-frp-client-for-ssh/</guid>
      <description>&lt;h1 id=&#34;download-and-extract-frp&#34;&gt;Download and Extract Frp&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Latest Frp download address: &lt;a href=&#34;https://github.com/fatedier/frp/releases/&#34;&gt;https://github.com/fatedier/frp/releases/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir ~/frp&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd ~/frp&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget https://github.com/fatedier/frp/releases/download/v0.35.0/frp_0.35.0_linux_amd64.tar.gz&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tar -xvzf frp_0.35.0_linux_amd64.tar.gz&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Ubuntu installs Frp server, non-client</title>
      <link>https://blog.margrop.net/en/post/ubuntu-install-frp-server/</link>
      <pubDate>Sat, 23 Jan 2021 13:43:20 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/ubuntu-install-frp-server/</guid>
      <description>Download and extract FRP Latest FRP release: https://github.com/fatedier/frp/releases/ cd ~ mkdir frp cd frp wget https://github.com/fatedier/frp/releases/download/v0.35.0/frp_0.35.0_linux_amd64.tar.gz tar -xvzf frp_0.35.0_linux_amd64.tar.gz cd frp_0.35.0_linux_amd64 Configure FRP Remove the default client configuration file&#xA;Create the server configuration file&#xA;cd ~/frp/frp_0.35.0_linux_amd64/ rm frpc rm frpc.ini rm frpc_full.ini ls -a sudo su rm frps.ini cat&amp;gt;/etc/frps.ini&amp;lt;&amp;lt;EOF [common] # FRP server bind port bind_port = 1000 # Set the HTTP access port to 1001 vhost_http_port = 1001 # Set the domain name (make sure it is reachable) subdomain_host = frp.</description>
    </item>
  </channel>
</rss>
