From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 27 04:46:06 2018 Received: (at 30532) by debbugs.gnu.org; 27 Feb 2018 09:46:06 +0000 Received: from localhost ([127.0.0.1]:34334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eqbpj-00024G-Bj for submit@debbugs.gnu.org; Tue, 27 Feb 2018 04:46:06 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:50870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eqbph-00021R-40 for 30532@debbugs.gnu.org; Tue, 27 Feb 2018 04:46:01 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 7EFB411FD3; Tue, 27 Feb 2018 10:46:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p8QUyxsmfHKc; Tue, 27 Feb 2018 10:45:58 +0100 (CET) Received: from ribbon (unknown [193.50.110.216]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 97AB51069E; Tue, 27 Feb 2018 10:45:58 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Carlo Zancanaro Subject: Re: [bug#30532] [PATCH] Shepherd: Terminate all services upon SIGTERM or SIGHUP References: <87sh9wnbu6.fsf@zancanaro.id.au> Date: Tue, 27 Feb 2018 10:45:58 +0100 In-Reply-To: <87sh9wnbu6.fsf@zancanaro.id.au> (Carlo Zancanaro's message of "Tue, 20 Feb 2018 04:11:45 +1100") Message-ID: <87lgfe4vft.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 30532 Cc: 30532@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Hi Carlo, Carlo Zancanaro skribis: > I use Shepherd to manage my user session, and if I log out then > Shepherd leaves all my services running. This patch handles SIGTERM > and SIGHUP to prevent that. Good catch! > I hope the guix-patches mailing list was the right place to send > it. From what I understand Shepherd development is done through the > guix lists, so it seemed to make the most sense to me. Yes, that=E2=80=99s perfect. > It's also worth noting that I had to run `gettextize` to get Shepherd > to build on current master, but I haven't included those changes in > this commit (because I don't know what should be committed and what > shouldn't). Right, I=E2=80=99m not sure what=E2=80=99s wrong with that. I=E2=80=99ve c= ommitted the same files under po/ as I did for Guix: --8<---------------cut here---------------start------------->8--- $ git ls-files po/ po/Makevars po/POTFILES.in --8<---------------cut here---------------end--------------->8--- > From aabb9c6b1b52189d20339531de0b8b96bcace69f Mon Sep 17 00:00:00 2001 > From: Carlo Zancanaro > Date: Tue, 20 Feb 2018 02:52:47 +1100 > Subject: [PATCH] Terminate all services upon SIGTERM or SIGHUP > > * modules/shepherd.scm (main): Add SIGTERM and SIGHUP handlers which stop > root-service. > * tests/sigterm.sh, tests/sighup.sh: New files. > * Makefile.am (TESTS): Add tests/sigterm.sh and tests/sighup.sh. Excellent! I have one request: since the three tests differ only in the signal name, could you make it a single test file and have a loop like: for signal in SIGTERM SIGHUP SIGINT TIA, Ludo=E2=80=99.