From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=unavailable autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 44F131FF40; Mon, 13 Jun 2016 23:01:38 +0000 (UTC) Date: Mon, 13 Jun 2016 23:01:38 +0000 From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/1] doc: systemd examples should only kill one process Message-ID: <20160613230138.GA15152@dcvr.yhbt.net> References: <20160613213805.6572-1-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160613213805.6572-1-e@80x24.org> List-Id: 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