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 v3] Add systemd socket launching support Date: Thu, 31 Mar 2016 20:27:23 +0100 Message-ID: <8737r6bg84.fsf@mattleach.net> References: <874mbn7kmn.fsf@mattleach.net> <871t6qkc3h.fsf@mattleach.net> <8337r6v930.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459452475 24933 80.91.229.3 (31 Mar 2016 19:27:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2016 19:27:55 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 31 21:27:48 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 1aliFt-0004y1-TQ for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2016 21:27:46 +0200 Original-Received: from localhost ([::1]:34029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aliFs-0008Bg-Vf for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2016 15:27:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41398) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aliFe-00089x-M9 for emacs-devel@gnu.org; Thu, 31 Mar 2016 15:27:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aliFd-0004qk-QM for emacs-devel@gnu.org; Thu, 31 Mar 2016 15:27:30 -0400 Original-Received: from mx0.mattleach.net ([176.58.118.143]:44188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aliFZ-0004pt-6N; Thu, 31 Mar 2016 15:27:25 -0400 Original-Received: by mx0.mattleach.net (Postfix, from userid 99) id C42D46222E; Thu, 31 Mar 2016 20:27:23 +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 197D16222B; Thu, 31 Mar 2016 20:27:23 +0100 (BST) In-Reply-To: (Stefan Monnier's message of "Thu, 31 Mar 2016 14:14:01 -0400") 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:202525 Archived-At: Hi Stefan, Stefan Monnier writes: >> And I object to exposing file descriptors to Lisp, certainly when that >> is not necessary. > > In other similar functionality I've seen over the years, an alternative > was to pass the fd as an additional argument on the command line, but in > any case whether it's received from the environment or the command line, > the file-descriptor to use will just be an integer, and it's already > exposed to Lisp. > > So, AFAICT we just need 3 elements: > - a function to get the FD number from systemd (which we could write in > Elisp, but is much better implemented as a call to systemd's support > library). > - a way to create a process-object from an existing file-descriptor > number. Should the socket descriptor number be passed in from Lisp, or should this be a Boolean flag that tells make-network-process to consult an internal variable? We can separate the libsystemd code from the make-network-process logic easily in both scenarios. Thanks, -- Matt