guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should Guix Home daemonize Shepherd?


From: Kevin Boulain
Subject: Re: Should Guix Home daemonize Shepherd?
Date: Sun, 15 May 2022 20:39:17 +0200

On Sun, 15 May 2022 at 15:20, Ludovic Courtès <ludo@gnu.org> wrote:
>
> The extra ‘setsid’ call LGTM, but why add an extra ‘primitive-fork’
> call?

Sorry, but don't use this patch.
The setsid call makes things slightly better but if Shepherd prints
anything (for example, a service's status update), it will crash
(IIRC) because stdout still references the terminal. Ideally,
exec-command (from the same file) could be used to also close the open
file descriptors (including the terminal's) but that's done too late
and would also close the control socket (and probably other important
stuff).
I wasn't quite sure how to work around that while keeping the existing behavior.

On Fri, 6 May 2022 at 10:07, Andrew Tropin <andrew@trop.in> wrote:
>
> Actually, XDG_RUNTIME_DIR can be provided not only by elogind, but also
> by pam_rundir or something similar, however in general it's true,
> runtime dir will be removed when session ends.

That was my thought at first (for example
https://github.com/ifreund/dumb_runtime_dir can create the directory
but not remove it, solving a part of the issue). Sadly, we lose
elogind's built-in power management and some other packages depend on
it anyway.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]