[systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

Lennart Poettering lennart at poettering.net
Tue Jun 16 08:59:42 UTC 2020


On Mo, 15.06.20 03:01, Kamal Rathi (kr30april at gmail.com) wrote:

> Hi Team,
>
> I have two services which are dependent on each other and are working fine
> at boot up but at shutdown / reboot , the processes get killed as shutdown
> got initated.

My educated guess is that your services use "su" or so, thus opening a
new session, which then gets killed like user sessions get killed. Use
"setpriv" to change privileges, not "su".

If "su" is not in the mix, then make sure your ExecStop= scripts work
correctly and kill all service processes correctly, since systemd just
kills what the ExecStop= binary doesn't kill.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list