emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 0/5] Add systemd socket launching support.


From: Matthew Leach
Subject: Re: [PATCH 0/5] Add systemd socket launching support.
Date: Sun, 27 Mar 2016 09:41:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Alan Mackenzie <address@hidden> writes:

> Hello, Matthew.

Hi Alan,

> On Sat, Mar 26, 2016 at 09:16:37PM +0000, Matthew Leach wrote:
>> Systemd has the ability to create a socket, launch a daemon upon
>> connection to that socket and hand over the socket to the new process
>> to handle.  In Emacs' case, we can delay the start of the Emacs daemon
>> until emacsclient is called upon a socket.
>
> Can we really?  What's the purpose of such a delay?

Currently, I start emacs --daemon upon login of my user and this can
delay the login process by a few seconds as Emacs initialises.  The idea
behind socket activation is that, systemd knows about the socket's
existence and won't unmount any file-systems where the socket resides
until the daemon has shut down, this is causing a race condition on
reboot for me.  Also, allows the start of emacs --daemon to be on-demand
and so there is less of a delay at login.

> Systemd is a system initialisation program, one of several available.
> It is highly controversial, and it is fairly obvious that one of its
> aims is to subvert GNU's central position in the GNU/Linux system.

Systemd is licensed under the GNU Lesser General Public License, [1],
and I don't see the harm in a small amount integration with another free
software package.  I can't comment on the controversies that you have
raised here as I don't know about them - I'm just trying to fix a
problem that exists with Emacs on my system.

> One of its methods of proliferation is to persuade maintainers to code
> in direct dependencies on systemd, thus imposing itself on anybody
> wishing to run the program.  (Witness Gnome.) Emacs is a core GNU
> product, and should remain equally accessible to all GNU users.

The proposed systemd integration can be disabled with --without-systemd
at configure time.  Maybe we could make this option disabled by default
as a compromise?  However, even If Emacs is compiled with systemd
support, this change does not affect the current behaviour of Emacs.

> Emacs should not be talking directly to init systems.  There are
> perfectly good, portable system level interfaces for talking to sockets,
> and Emacs should restrict itself to using them.

Given that Emacs becomes larger every day and can behave as a daemon
process, I feel that giving users more options to control when and how
Emacs starts up is a worthwhile endeavour.

> Should your patch be accepted, it would lead to an Emacs version
> specific to an initialisation system, a degree of fragmentation we've
> not had before, as far as I know.
>
> And the idea of making systemd dependency a default for building Emacs
> seems somewhat on the far side of acceptability.

This patch does *not* make systemd a dependency of Emacs.  Again, this
patch provides a small degree of integration which can easily be
disabled and doesn't affect the current Emacs behaviour if enabled.


[1]: https://freedesktop.org/wiki/Software/systemd/

Thanks,
-- 
Matt



reply via email to

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