For our daemons, killing only the master process is enough. Killing the entire control group (as done by default in systemd) may cause subprocesses such as git to shut down unexpectedly.
Having systemd kill workers directly will also cause an immediate shutdown since the master would've already signaled the workers; and workers will die after two shutdown requests. --- examples/public-inbox-httpd@.service | 1 + examples/public-inbox-nntpd@.service | 1 + examples/unsubscribe-psgi@.service | 1 + 3 files changed, 3 insertions(+) diff --git a/examples/public-inbox-httpd@.service b/examples/public-inbox-httpd@.service index 3bb7072..6222de5 100644 --- a/examples/public-inbox-httpd@.service +++ b/examples/public-inbox-httpd@.service @@ -24,6 +24,7 @@ User = nobody Group = nogroup ExecReload = /bin/kill -HUP $MAINPID TimeoutStopSec = 3600 +KillMode = process [Install] WantedBy = multi-user.target diff --git a/examples/public-inbox-nntpd@.service b/examples/public-inbox-nntpd@.service index 078e920..3e203e0 100644 --- a/examples/public-inbox-nntpd@.service +++ b/examples/public-inbox-nntpd@.service @@ -26,6 +26,7 @@ User = nobody Group = nogroup ExecReload = /bin/kill -HUP $MAINPID TimeoutStopSec = 3600 +KillMode = process [Install] WantedBy = multi-user.target diff --git a/examples/unsubscribe-psgi@.service b/examples/unsubscribe-psgi@.service index 2dc4270..acc29e8 100644 --- a/examples/unsubscribe-psgi@.service +++ b/examples/unsubscribe-psgi@.service @@ -15,6 +15,7 @@ ExecStart = /usr/local/bin/public-inbox-httpd -W0 /etc/unsubscribe.psgi Sockets = unsubscribe-psgi.socket # we need to modify the mlmmj spool User = mlmmj +KillMode = process [Install] WantedBy = multi-user.target -- unsubscribe: meta+unsubscr...@public-inbox.org archive: https://public-inbox.org/meta/