How systemd stop command actually works

后端 未结 2 873
不知归路
不知归路 2020-12-23 15:53

I am using a systemd service which calls a process when it\'s been \"started\" (e.g.$systemctl start test.service). As per the design, the process stays for ever in a loop,

2条回答
  •  甜味超标
    2020-12-23 16:33

    By default, a SIGTERM is sent, followed by 90 seconds of waiting followed by a SIGKILL.

    Killing processes with systemd is very customizable and well-documented.

    I recommend reading all of man systemd.kill as well as reading about ExecStop= in man systemd.service.

    To respond to those signals, refer to the signal handling documentation for the language you are using.

提交回复
热议问题