You can also set various timeouts for that:
Also note that doing this this way (i.e. SIGTERM first, SIGKILL after a timeout) is hardly a new invention of ours. That's what distributions have been doing shortly before powering off the OS for ages (remember those: "Sending SIGTERM..." messages and "Sending SIGKILL..." message?), and this is also what start-stop-daemon supports since a long time. Upstart implements it too. The only difference with systemd is that we will kill *all* processes of a service (which is necessary, to make this clean), and we allow you to configure the parameters much more flexibly than anything before (see man pages above: you can configure the timeouts, the signal sent, you can turn off SIGKILL and more...), you can turn it off *entirely*, and you can say that only the main PID shall be killed.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds