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:32:52 +0100 Message-ID: <87y48ya1ej.fsf@mattleach.net> References: <874mbn7kmn.fsf@mattleach.net> <871t6qkc3h.fsf@mattleach.net> <8337r6v930.fsf@gnu.org> <8737r6bg84.fsf@mattleach.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459452805 30622 80.91.229.3 (31 Mar 2016 19:33:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2016 19:33:25 +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:33:17 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 1aliLE-0007KN-M8 for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2016 21:33:16 +0200 Original-Received: from localhost ([::1]:34047 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aliLE-0001rb-5M for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2016 15:33:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aliKz-0001qV-BS for emacs-devel@gnu.org; Thu, 31 Mar 2016 15:33:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aliKv-0006WV-Jw for emacs-devel@gnu.org; Thu, 31 Mar 2016 15:33:01 -0400 Original-Received: from mx0.mattleach.net ([176.58.118.143]:44206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aliKr-0006Vc-0N; Thu, 31 Mar 2016 15:32:53 -0400 Original-Received: by mx0.mattleach.net (Postfix, from userid 99) id 97E016222E; Thu, 31 Mar 2016 20:32:52 +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 055136222B; Thu, 31 Mar 2016 20:32:51 +0100 (BST) In-Reply-To: <8737r6bg84.fsf@mattleach.net> (Matthew Leach's message of "Thu, 31 Mar 2016 20:27:23 +0100") 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:202527 Archived-At: Matthew Leach writes: > 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. I forgot to mention, my vote is for latter as it prevents users passing in garbage to make-network-process. -- Matt