all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matthew Leach <matthew@mattleach.net>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Stefan Monnier <monnier@IRO.UMontreal.CA>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: [PATCH v5] Add systemd socket launching support
Date: Thu, 21 Apr 2016 21:59:30 +0100	[thread overview]
Message-ID: <874maun0el.fsf@mattleach.net> (raw)
In-Reply-To: <57147449.4060307@cs.ucla.edu> (Paul Eggert's message of "Sun, 17 Apr 2016 22:44:41 -0700")

Hi Paul,

Paul Eggert <eggert@cs.ucla.edu> 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 <eggert@cs.ucla.edu>
> 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



  parent reply	other threads:[~2016-04-21 20:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-10 14:06 [PATCH v5] Add systemd socket launching support Matthew Leach
2016-04-14 17:54 ` Matthew Leach
2016-04-17  5:42   ` Paul Eggert
2016-04-17 11:30     ` Matthew Leach
2016-04-18  5:44       ` Paul Eggert
2016-04-18 19:33         ` Matthew Leach
2016-04-21 20:59         ` Matthew Leach [this message]
2016-04-26  9:17           ` Matthew Leach
2016-04-26 16:15             ` Paul Eggert
2016-04-27  9:56               ` Matthew Leach
2016-04-16  9:50 ` Eli Zaretskii
2016-04-17 11:15   ` Matthew Leach
2016-04-21 16:17     ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874maun0el.fsf@mattleach.net \
    --to=matthew@mattleach.net \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.