From: ludo@gnu.org (Ludovic Courtès)
To: Carlo Zancanaro <carlo@zancanaro.id.au>
Cc: 30532@debbugs.gnu.org
Subject: [bug#30532] [PATCH] Shepherd: Terminate all services upon SIGTERM or SIGHUP
Date: Tue, 27 Feb 2018 10:45:58 +0100 [thread overview]
Message-ID: <87lgfe4vft.fsf@gnu.org> (raw)
In-Reply-To: <87sh9wnbu6.fsf@zancanaro.id.au> (Carlo Zancanaro's message of "Tue, 20 Feb 2018 04:11:45 +1100")
Hi Carlo,
Carlo Zancanaro <carlo@zancanaro.id.au> 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’s 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’m not sure what’s wrong with that. I’ve committed 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 <carlo@zancanaro.id.au>
> 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’.
next prev parent reply other threads:[~2018-02-27 9:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-19 17:11 [bug#30532] [PATCH] Shepherd: Terminate all services upon SIGTERM or SIGHUP Carlo Zancanaro
2018-02-27 9:45 ` Ludovic Courtès [this message]
2018-02-27 17:22 ` Leo Famulari
2018-02-27 21:03 ` Ludovic Courtès
2018-02-27 21:19 ` Carlo Zancanaro
2018-02-27 21:30 ` Ludovic Courtès
2018-03-02 0:30 ` Leo Famulari
2018-03-02 7:25 ` Carlo Zancanaro
2018-02-27 21:29 ` Carlo Zancanaro
2018-03-01 9:55 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lgfe4vft.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=30532@debbugs.gnu.org \
--cc=carlo@zancanaro.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).