[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: |
Matthew Leach |
Subject: |
Re: [PATCH 3/5] Permit systemd-allocated socket file-descriptors to be used. |
Date: |
Sun, 27 Mar 2016 13:23:52 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Hi Lars,
Thanks for the review.
Lars Magne Ingebrigtsen <address@hidden> writes:
[...]
>> +: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.
Initially I had the same thought and gave this variable a generic name
as you propose. However, it turns out that systemd has already called
bind() on the socket and a further call to bind() would error. At this
point I thought this interface was too systemd-specific to allow
non-systemd allocated file-descriptors to be passed in.
I could always go back to a generic interface, but stipulate that bind()
must have already been called on the socket?
Thanks,
--
Matt
[PATCH 1/5] Check for libsystemd when building Emacs., Matthew Leach, 2016/03/26
Re: [PATCH 0/5] Add systemd socket launching support., Alan Mackenzie, 2016/03/26
Re: [PATCH 0/5] Add systemd socket launching support., Matthew Leach, 2016/03/27