GNU bug report logs -
#30532
[PATCH] Shepherd: Terminate all services upon SIGTERM or SIGHUP
Previous Next
Reported by: Carlo Zancanaro <carlo <at> zancanaro.id.au>
Date: Mon, 19 Feb 2018 17:13:02 UTC
Severity: normal
Tags: fixed, patch
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi Carlo,
Carlo Zancanaro <carlo <at> 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 <at> 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’.
This bug report was last modified 7 years and 83 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.