From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Leach Newsgroups: gmane.emacs.devel Subject: Re: [PATCH 3/5] Permit systemd-allocated socket file-descriptors to be used. Date: Sun, 27 Mar 2016 13:23:52 +0100 Message-ID: <87vb48w1lz.fsf@mattleach.net> References: <1459027002-13215-1-git-send-email-matthew@mattleach.net> <1459027002-13215-4-git-send-email-matthew@mattleach.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459081458 25372 80.91.229.3 (27 Mar 2016 12:24:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Mar 2016 12:24:18 +0000 (UTC) Cc: emacs-devel To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 27 14:24:10 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ak9jl-0007iv-9p for ged-emacs-devel@m.gmane.org; Sun, 27 Mar 2016 14:24:09 +0200 Original-Received: from localhost ([::1]:35791 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ak9jk-0007wp-GR for ged-emacs-devel@m.gmane.org; Sun, 27 Mar 2016 08:24:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ak9jd-0007wj-DF for emacs-devel@gnu.org; Sun, 27 Mar 2016 08:24:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ak9jZ-0006yL-CO for emacs-devel@gnu.org; Sun, 27 Mar 2016 08:24:01 -0400 Original-Received: from mx0.mattleach.net ([176.58.118.143]:52122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ak9jZ-0006yE-6e for emacs-devel@gnu.org; Sun, 27 Mar 2016 08:23:57 -0400 Original-Received: by mx0.mattleach.net (Postfix, from userid 99) id 68C046222E; Sun, 27 Mar 2016 13:23:56 +0100 (BST) Original-Received: from spline.mattleach.net (host81-159-23-200.range81-159.btcentralplus.com [81.159.23.200]) by mx0.mattleach.net (Postfix) with ESMTPSA id 2C02162226; Sun, 27 Mar 2016 13:23:52 +0100 (BST) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 27 Mar 2016 14:08:56 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 176.58.118.143 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202283 Archived-At: Hi Lars, Thanks for the review. Lars Magne Ingebrigtsen 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