[systemd-devel] Is restart gracefull?

Jan Alexander Steffens jan.steffens at gmail.com
Fri Nov 29 04:12:26 PST 2013


On Fri, Nov 29, 2013 at 12:52 PM, Cecil Westerhof
<Cecil.Westerhof at snow.nl> wrote:
>> Just to clarify, "stop" (and, by extension "restart") is also up to
>> the implementer of the unit file. There just happens to be a default,
>> unlike with "reload." See the service and exec man pages for details.
>> Regardless, "restart" and "stop" usually both involve a full shutdown
>> of every process running the daemon. I think it's possible to override
>> this behavior with certain options, but you shouldn't.
>
>
> There is of-course an important difference. As I understood it, Apache is
> notorious for processes that escape. (That is one of the reasons that
> cgroups usage of systemd is such an improvement.) In the old situation
> nothing happened to those processes. (With potential nasty results.) What
> happens to those processes under systemd?

Unless otherwise configured, as soon as the ExecStop command is
finished, systemd terminates all remaining processes. After a grace
period, the processes are killed.

If there's no ExecStop command defined, termination begins
immediately. For many services this is simple and appropriate
behavior.


More information about the systemd-devel mailing list