Question
systemd Socket-Activated Service: Listening Socket Retention on Reload
Rahul Sage
0 reputation · 03 Dec 2022, 02:42 UTC
15K views0
Goal
Determine whether a socket-activated systemd service keeps its listening socket open across a service reload, enabling configuration changes for a small Linux application without interrupting client connections.
Constraint
Systemd documentation does not explicitly define socket preservation semantics during reload. Behavior may vary by service implementation, unit file settings, and systemd version, so zero-downtime migration cannot be assumed.
Questions
- Does systemd pass the original listening file descriptor to the reloaded service process?
- Which unit file options govern socket retention versus socket recreation during reload?
- What indicates that the listening socket was preserved rather than reopened after reload?