emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v5] Add systemd socket launching support


From: Matthew Leach
Subject: Re: [PATCH v5] Add systemd socket launching support
Date: Thu, 21 Apr 2016 21:59:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Hi Paul,

Paul Eggert <address@hidden> writes:
> Matthew Leach wrote:
>> There is no specific reason other than 226 is what is installed on my
>> system and what I have tested against.  If you are able to test on an
>> earlier version, this number could be reduced.
>
> Thanks. Can you please investigate which is the earliest number for
> which it's plausible that the new systemd code will work? In the
> meantime I installed the attached patch, which lists that as a FIXME
> and addresses the other problem I mentioned along with a few minor
> style glitches.

I've just been looking at the patch (sorry, it probably should have been
sooner) and it looks as though there is an issue, I'm afraid.  Please
see the comment below.

> From fd379e7ed99557bb4348e215bfc711af2d9360e8 Mon Sep 17 00:00:00 2001
> From: Paul Eggert <address@hidden>
> Date: Sun, 17 Apr 2016 22:41:14 -0700
> Subject: [PATCH] Minor fixups for external socket launching
>
> * configure.ac (HAVE_LIBSYSTEMD): Change earliest version to 222.
> * doc/emacs/misc.texi (Emacs Server):
> * etc/NEWS: Spelling and doc fixes.
> * src/emacs.c (main) [HAVE_LIBSYSTEMD]:
> Check for sd_is_socket returning positive, not zero.
> * src/process.c (external_sock_fd): Instead of initializing here ...
> (init_process_emacs): ... initialize it here, so that it does the
> right thing after dump/restore.
> (connect_network_socket): Simplify socket_to_use test.
> ---
>  configure.ac        |  5 ++++-
>  doc/emacs/misc.texi |  2 +-
>  etc/NEWS            | 12 ++++++------
>  src/emacs.c         | 26 ++++++++++++--------------
>  src/process.c       | 35 ++++++++++++++++-------------------
>  5 files changed, 39 insertions(+), 41 deletions(-)
>

[...]

> @@ -7775,7 +7772,7 @@ init_process_emacs (void)
>    FD_ZERO (&non_keyboard_wait_mask);
>    FD_ZERO (&non_process_wait_mask);
>    FD_ZERO (&write_mask);
> -  max_process_desc = max_input_desc = -1;
> +  max_process_desc = max_input_desc = external_sock_fd = -1;

Setting `external_sock_fd' here doesn't work as 'init_process_emacs' is
called later in 'main' than 'set_external_socket_descriptor' is; any
descriptor that is passed through from systemd would be overwritten with
-1.

Thanks,
-- 
Matt



reply via email to

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