From: Carlo Zancanaro <carlo@zancanaro.id.au>
To: Leo Famulari <leo@famulari.name>
Cc: 30532@debbugs.gnu.org
Subject: [bug#30532] [PATCH] Shepherd: Terminate all services upon SIGTERM or SIGHUP
Date: Fri, 02 Mar 2018 18:25:26 +1100 [thread overview]
Message-ID: <874llzgcrd.fsf@zancanaro.id.au> (raw)
In-Reply-To: <20180302003009.GA8305@jasmine.lan>
[-- Attachment #1: Type: text/plain, Size: 1200 bytes --]
Hey Leo,
On Fri, Mar 02 2018, Leo Famulari wrote:
> I'd rather we address this use case as described previously,
> with something like 'enable-linger'.
I've not used the enable-linger functionality of systemd, but
after doing some reading, maybe it could work like this?
At boot-time we could start an instance of shepherd for each
permitted user (maybe with a `lingering-user-service-type` which
adds a shepherd service?). It loads ~/.config/shepherd/init.scm,
and starts any services which are enabled. It also adds a
pseudo-service "login", which allows a user to specify a
dependency on there being a current user session (so shepherd can
be told to start processes on login, and to terminate them on
logout).
For users who don't have a `lingering-user-service-type` running,
pid 1 will listen until they log-in and will start a shepherd
instance for them on login, loading ~/.config/shepherd/init.scm.
When they logout pid 1 will terminate their user shepherd instance
(along with any services it started).
This will require a few more changes to shepherd before it can
work, but does that sound like the sort of behaviour you want?
Could you open a new bug about it?
Carlo
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2018-03-02 7:26 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
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 [this message]
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=874llzgcrd.fsf@zancanaro.id.au \
--to=carlo@zancanaro.id.au \
--cc=30532@debbugs.gnu.org \
--cc=leo@famulari.name \
/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).