[systemd-devel] restart vs. stop/start
Lennart Poettering
lennart at poettering.net
Mon May 23 10:14:50 UTC 2016
On Mon, 23.05.16 13:11, Andrei Borzenkov (arvidjaar at gmail.com) wrote:
> On Mon, May 23, 2016 at 12:25 PM, Lennart Poettering
> <lennart at poettering.net> wrote:
> > On Sat, 21.05.16 10:31, Andrei Borzenkov (arvidjaar at gmail.com) wrote:
> >
> >> >> I need a way to know if "restart "or "stop" was used because the mapping
> >> >> to stop / start gives my service a completely different behaviour than
> >> >> expected on restart.
> >> >>
> >> >> Is there a way to find out if "stop" or "restart" was used?
> >> >
> >> > if you need to differ here your service is broken by design - why do you
> >> > need to kow what triggered stop and what else do you imagine for
> >> > "restart" then stop-start?
> >> >
> >>
> >> I am curious how you implement "systemctl daemon-restart" using only
> >> plain "stop systemd" followed by "start systemd".
> >
> > Hmm? What is "systemctl daemon-restart" supposed to be?
>
> It is supposed to be "daemon-reexec". I always confuse it.
Reexec is something very special really. And we probably should not
even have it (and "systemctl daemon-reload" should just do what
"systemctl daemon-reexec" currently does). The conceptual differences
between both are minimal, and the codepaths pretty much the same
anyway... If you so will, "daemon-reload" and "daemon-reexec" are just
two slightly different flavours of the same "reload" concept.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list