unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Nicolas Graves via "Development of GNU Guix and the GNU System
	distribution." <guix-devel@gnu.org>
Cc: emacs-devel@gnu.org,  Nicolas Graves <ngraves@ngraves.fr>,
	 Andrew Tropin <andrew@trop.in>,
	 Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: [Nicolas Graves] [PATCH v6 01/10] rde: emacs: Start emacs in --daemon mode, with shepherd and pid-file
Date: Fri, 12 Apr 2024 22:38:35 +0200	[thread overview]
Message-ID: <87jzl22u5w.fsf@gnu.org> (raw)
In-Reply-To: <87zfu0m9ps.fsf@ngraves.fr> (Nicolas Graves via's message of "Thu, 11 Apr 2024 13:15:27 +0200")

Hi Nicolas,

Nicolas Graves skribis:

> As promised to Stefan a few months ago, here's a use case of
> Shepherd/Emacs implementation that we developped in RDE.

Would be nice to have it in Guix Home!

> We're using the --daemon option on the Shepherd side to launch the
> server in the background, include code in Emacs configuration to make it
> create a pid-file as soon as the server has started, and redefine
> kill-emacs to be managed by the Shepherd.

Emacs supports systemd-style socket activation so, instead of using a
PID file, you could use ‘make-systemd-constructor’.

Now, that code in emacs.c is unfortunately implemented via libsystemd
and thus disabled in Guix.  Using libsystemd in this case is unnecessary
(and increases the attack surface, as we’ve seen with the xz backdoor):
it could read the ‘LISTEN_FDS’ and ‘LISTEN_PID’ environment variables
instead of calling the sd_* functions.

  https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html
  https://www.gnu.org/software/shepherd/manual/html_node/Service-De_002d-and-Constructors.html#index-make_002dsystemd_002dconstructor

Thanks,
Ludo’.


  reply	other threads:[~2024-04-12 20:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240410234923.29319-2-ngraves@ngraves.fr>
     [not found] ` <875xwotg35.fsf@trop.in>
2024-04-11 11:15   ` [Nicolas Graves] [PATCH v6 01/10] rde: emacs: Start emacs in --daemon mode, with shepherd and pid-file Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2024-04-12 20:38     ` Ludovic Courtès [this message]
2024-04-13 14:20       ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2024-04-13 15:09         ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2024-04-13 15:16         ` Stefan Monnier
2024-04-14 19:11           ` Björn Bidar
2024-04-14 20:52             ` Stefan Monnier
2024-04-19 14:19               ` Ludovic Courtès
2024-04-19 14:36                 ` Rudolf Schlatte
2024-04-20  2:31                   ` Stefan Monnier
2024-04-19 14:17             ` Ludovic Courtès
2024-05-11 20:15           ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2024-05-11 23:07             ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2024-05-12  6:29               ` Eli Zaretskii
2024-05-12  7:50                 ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2024-05-12  7:54                   ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2024-05-12  9:36                   ` Eli Zaretskii
2024-05-12 11:11                     ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2024-05-12 15:01                       ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2024-04-13 16:50       ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2024-04-19 14:25         ` Ludovic Courtès
2024-04-14 16:51       ` Felix Lechner via Development of GNU Guix and the GNU System distribution.

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=87jzl22u5w.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=andrew@trop.in \
    --cc=emacs-devel@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=ngraves@ngraves.fr \
    /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).