-
Notifications
You must be signed in to change notification settings - Fork 139
Description
Systemd is quite versatile in how it supports starting services. Most notably, for services expecting a single socket on fd 0, it can arrange for a single activating socket to be passed on that fd. This allows simplification of the c code by removing all references to (and thus dependencies on) systemd.
From systemd.exec(5):
StandardInput=
Controls where file descriptor 0 (STDIN) of the executed processes is connected to. Takes one of null, tty, tty-force, tty-fail, data, file:path, socket or fd:name.
[...]
The socket option is valid in socket-activated services only, and requires the relevant socket unit file (see systemd.socket(5) for details) to have Accept=yes set, or to specify a single socket only. If this option is set, standard input will be connected to the socket the service was activated from, which is primarily useful for compatibility with daemons designed for use with the traditional inetd(8) socket activation daemon ($LISTEN_FDS (and related) environment variables are not passed when socket value is configured).
This seems suitable (without Accept=yes) because the current code only supports one fd passed by systemd in the first place.