From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH v3] Add systemd socket launching support Date: Thu, 31 Mar 2016 14:14:01 -0400 Message-ID: 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 1459448072 18559 80.91.229.3 (31 Mar 2016 18:14:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2016 18:14:32 +0000 (UTC) Cc: matthew@mattleach.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 31 20:14:23 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 1alh6t-0005be-25 for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2016 20:14:23 +0200 Original-Received: from localhost ([::1]:33729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alh6s-0005ex-6O for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2016 14:14:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alh6c-0005el-LA for emacs-devel@gnu.org; Thu, 31 Mar 2016 14:14:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alh6Z-0003nZ-Fz for emacs-devel@gnu.org; Thu, 31 Mar 2016 14:14:06 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:47324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alh6Z-0003nH-BE; Thu, 31 Mar 2016 14:14:03 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u2VIE13g009179; Thu, 31 Mar 2016 14:14:02 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 861C1AE15D; Thu, 31 Mar 2016 14:14:01 -0400 (EDT) In-Reply-To: <8337r6v930.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 31 Mar 2016 20:41:23 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5628=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5628> : inlines <4625> : streams <1611911> : uri <2176496> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:202521 Archived-At: > 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. - changes in server.el to connect the previous 2 elements together. AFAICT, only the first part is systemd-specific, so I think it would make sense to try and avoid having systemd-specific details leak to the other parts. Stefan