Expand description
systemd integration (18.20.0, #67), without libsystemd.
- Notifications (
Type=notify):readyonce rws serves,reloading/readyaround a reload,stoppingat shutdown,statuslines, andWATCHDOG=1every halfWatchdogSecwhile the runtime runs. Datagrams to$NOTIFY_SOCKET(a path, or@namein the abstract namespace); nothing happens without it. - Socket activation: listeners systemd passes (
LISTEN_FDS,LISTEN_PID,LISTEN_FDNAMES) are used instead of binding:tcpandudpreturn a copy of the inherited socket for an address, matched by port (and kind) — systemd’sListenStream=443is[::]:443while rws’sipmay say0.0.0.0. systemd keeps the sockets across restarts, so nothing is refused while rws starts again.
Functions§
- activated
- Whether systemd passed any socket.
- notify
- Send
messageto$NOTIFY_SOCKET;falsewithout one (or on error). - ready
- rws serves:
READY=1(once), and the watchdog starts. - reloaded
- A reload is done.
- reloading
- A reload starts (
RELOADING=1with the monotonic time systemd wants). - status
- A status line for
systemctl status. - stopping
- Shutting down.
- tcp
- A copy of the TCP listener systemd passed for
addr(or namedname), if any. Each call is a new descriptor of the same socket, so several runtimes can accept on it. - udp
- A copy of the UDP socket systemd passed for
addr(or namedname).