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
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]
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.