]> Sergey Matveev's repositories - public-inbox.git/commitdiff
doc: systemd examples should only kill one process
authorEric Wong <e@80x24.org>
Mon, 13 Jun 2016 22:56:27 +0000 (22:56 +0000)
committerEric Wong <e@80x24.org>
Mon, 13 Jun 2016 23:00:04 +0000 (23:00 +0000)
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
examples/public-inbox-nntpd@.service
examples/unsubscribe-psgi@.service

index 3bb707263fbd4cfabd7be95252646e89d3e880b0..6222de59153a91eed14507239da4e0342229228b 100644 (file)
@@ -24,6 +24,7 @@ User = nobody
 Group = nogroup
 ExecReload = /bin/kill -HUP $MAINPID
 TimeoutStopSec = 3600
 Group = nogroup
 ExecReload = /bin/kill -HUP $MAINPID
 TimeoutStopSec = 3600
+KillMode = process
 
 [Install]
 WantedBy = multi-user.target
 
 [Install]
 WantedBy = multi-user.target
index 078e920a8de925326665d7e925262572930eec62..3e203e0bfbce0e3a7c7bbe5db9bd865a225e5264 100644 (file)
@@ -26,6 +26,7 @@ User = nobody
 Group = nogroup
 ExecReload = /bin/kill -HUP $MAINPID
 TimeoutStopSec = 3600
 Group = nogroup
 ExecReload = /bin/kill -HUP $MAINPID
 TimeoutStopSec = 3600
+KillMode = process
 
 [Install]
 WantedBy = multi-user.target
 
 [Install]
 WantedBy = multi-user.target
index 2dc4270f0f5a8b7225f322bbb9ae21da69ec49d6..acc29e8e64c648a448ac4433fd587a17da561f78 100644 (file)
@@ -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
 Sockets = unsubscribe-psgi.socket
 # we need to modify the mlmmj spool
 User = mlmmj
+KillMode = process
 
 [Install]
 WantedBy = multi-user.target
 
 [Install]
 WantedBy = multi-user.target