emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/5] Permit systemd-allocated socket file-descriptors to be u


From: Lars Magne Ingebrigtsen
Subject: Re: [PATCH 3/5] Permit systemd-allocated socket file-descriptors to be used.
Date: Sun, 27 Mar 2016 14:08:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Having systemd support in Emacs is probably nice, I think, but one
comment on this part of the patch series:

Matthew Leach <address@hidden> writes:

> * src/process.c (connect_network_socket): Allow a systemd-allocated
>   file-descriptor to be passed, and use it, avoiding the call to
>   socket() and bind().

[...]

> +connect_network_socket (Lisp_Object proc, Lisp_Object ip_addresses,
> +                        Lisp_Object systemd_fd)

[...]

> -      s = socket (family, p->socktype | SOCK_CLOEXEC, p->ai_protocol);
> +      if (use_systemd_fd)
> +          s = XINT (systemd_fd);
> +      else
> +          s = socket (family, p->socktype | SOCK_CLOEXEC, p->ai_protocol);
> +

[...]

> +:systemd-fd INT    -- use this file-descriptor, passed in through systemd,
> +                      and don't call socket() and bind().

There isn't really anything systemd-specific about any of this code (as
far as I can see): It's about calling `make-network-socket' on a file
descriptor that's already been opened.  So I'd just rename this
parameter to :allocated-file-descriptor or something and adjust the
names of the other variables used.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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