GNU bug report logs -
#74534
[shepherd] guix-home managed shepherd shares process group with shell
Previous Next
Reported by: Jelle Licht <jlicht <at> fsfe.org>
Date: Mon, 25 Nov 2024 18:44:02 UTC
Severity: normal
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Thu, 28 Nov 2024 08:48:34 +0100
with message-id <87ed2v94tp.fsf <at> gnu.org>
and subject line Re: bug#74534: [shepherd] guix-home managed shepherd shares process group with shell
has caused the debbugs.gnu.org bug report #74534,
regarding [shepherd] guix-home managed shepherd shares process group with shell
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
74534: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74534
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Cc'ing Tomas and Ludo, as they actually diagnosed the issue [0].
The user shepherd, as configured using guix home, runs under the same
process group as the shell that initially triggered guix home's
"$HOME/.guix-home/on-first-login" script.
This leads to the user shepherd receiving signals that are sent to the
shell, such as a SIGINT/^C, and subsequently stopping entirely.
If I understand the fine folks on IRC correctly, the daemonize action of
the root-service in shepherd is missing a call to (setsid). I am
uncertain whether this setsid call should be made conditional or not.
Kind regards,
Jelle Licht
[0]: https://logs.guix.gnu.org/guix/2024-11-25.log#172506
[Message part 3 (message/rfc822, inline)]
Hello!
Tomas Volf <~@wolfsden.cz> skribis:
> Jelle Licht <jlicht <at> fsfe.org> writes:
>
>> Addendum:
>> running `herd eval root "(setsid)"` solves my particular issue, making
>> ^C on my shell no longer kill my user shepherd.
Fixed in Shepherd commit 2b41e5bad65e783c7a9cc4d7a3f460cab6b64285.
> Oh, that is neat. I did not realize this can be fixed like that without
> modifying shepherd's source code. I turned it into a service that I
> added into my home-environment:
>
> ;; Bug 74534: Home shepherd can be killed by ^C
> (simple-service 'call-setsid-in-home-shepherd home-shepherd-service-type
> (list
> (shepherd-service
> (documentation "Give shepherd its own process group.")
> (provision '(setsid))
> (start #~(lambda _ (setsid) #t))
> (one-shot? #t))))
Nice workaound.
Thank you, comrades!
Ludo’.
This bug report was last modified 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.