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’.

  • [Nicolas Graves] ... Development of GNU Guix and the GNU System distribution.
    • Re: [Nicolas... Ludovic Courtès
      • Re: [Nic... Development of GNU Guix and the GNU System distribution.
        • Re: ... Development of GNU Guix and the GNU System distribution.
        • Re: ... Stefan Monnier
          • ... Björn Bidar
            • ... Stefan Monnier
              • ... Ludovic Courtès
                • ... Rudolf Schlatte
                • ... Stefan Monnier
            • ... Ludovic Courtès
          • ... Development of GNU Guix and the GNU System distribution.

Reply via email to