unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kevin Boulain <kevinboulain@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>, andrew@trop.in
Cc: guix-devel@gnu.org
Subject: Re: Should Guix Home daemonize Shepherd?
Date: Sun, 15 May 2022 20:39:17 +0200	[thread overview]
Message-ID: <CABaj1X-hnN5VAEpo9EP_pSCpkv-vWrpkmnds+_v5wX6zp0NnVA@mail.gmail.com> (raw)
In-Reply-To: <87lev3dja7.fsf@gnu.org>

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	other threads:[~2022-05-15 18:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-06 18:47 Should Guix Home daemonize Shepherd? Kevin Boulain
2022-03-12 17:49 ` Kevin Boulain
2022-05-06  8:07   ` Andrew Tropin
2022-05-15 13:20   ` Ludovic Courtès
2022-05-15 18:39     ` Kevin Boulain [this message]

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=CABaj1X-hnN5VAEpo9EP_pSCpkv-vWrpkmnds+_v5wX6zp0NnVA@mail.gmail.com \
    --to=kevinboulain@gmail.com \
    --cc=andrew@trop.in \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /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).