[systemd-devel] .service and .socket

Lennart Poettering lennart at poettering.net
Wed Jan 2 10:16:14 UTC 2019


On Mi, 02.01.19 17:31, Michael Chapman (mike at very.puzzling.org) wrote:

> > 2. If not, could the .service file gain a default / implicit
> > dependency on the .socket file?
>
> There are a some reasons for not having a .service dependent upon its
> .socket. Many services can be started directly and will work correctly
> even when not passed any sockets from systemd.

This property is something I liked when we put this together
initially: i.e. have a service that can both act socket-activated and
in classic mode. But today I must say I don't think this particular
facet was a good idea, actually, because it creates raciness pitfalls:
if you start the service before its socket unit you get very different
behaviour then the other way round...

Lennart

--
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list