Socket Activation Keeps Connections Waiting, Not Refused, During a systemd Restart

A runbook for replacing a running daemon without dropping requests, tested on a small TCP server under real systemd. A plain restart refused or reset connections every time; starting the new version beside the old one avoided refusals but still reset a connection in some runs, and a kernel setting made those resets go away; socket activation produced no errors. Also covered: draining in-flight work against TimeoutStopSec, and a release swap that checks the new version and rolls back.

October 3, 2026 | 17 min

setsid Doesn't Save a Child Process from systemd

A self-updating daemon that starts an update helper detached with setsid and then restarts its own service loses the helper too, because systemd decides what belongs to a service by cgroup. In the same way, launchd cleans up by process group, and Go’s exec.CommandContext only kills the direct child on cancel. Results and fixes from four trials on a real systemd 257 and a Go experiment with a grandchild process.

September 28, 2026 | 10 min