Re: Survey answers part 3: systemd is not portable and what this means for our ports
On 15/07/13 14:38, Helmut Grohne wrote:
> Indeed we are out of luck with Type=forking. In the presence of a decent
> init system daemonizing is the job of the init system. It is uselessly
> duplicated code. Let's rip that code out of daemons and turn them into
> "simple" ones.
It does matter where there are dependencies. systemd considers "simple"
services to be ready (for use by the services that depend on them) as
soon as they have been exec'd, whereas "forking" services aren't
considered to be ready until they have forked (and the parent process
has exited). sysvinit scripts block as long as one of their processes
blocks, so they automatically get that behaviour.
"simple" systemd services mostly avoid dependency problems by using
socket-activation: for instance, it doesn't matter if things try to use
dbus-daemon before it's ready to start accept()ing connections, because
systemd was already listen()ing on the appropriate socket on its behalf,
so anything that tries to connect to D-Bus will just block in connect()
until dbus-daemon can accept() it. Init systems that don't have socket
activation can't use that trick.