From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH v3] Add systemd socket launching support Date: Thu, 31 Mar 2016 20:41:23 +0300 Message-ID: <8337r6v930.fsf@gnu.org> References: <874mbn7kmn.fsf@mattleach.net> <871t6qkc3h.fsf@mattleach.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1459446118 18817 80.91.229.3 (31 Mar 2016 17:41:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2016 17:41:58 +0000 (UTC) Cc: matthew@mattleach.net, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 31 19:41:57 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 1algbU-0008OM-VV for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2016 19:41:57 +0200 Original-Received: from localhost ([::1]:33628 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1algbU-0004op-9K for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2016 13:41:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1algbC-0004og-HG for emacs-devel@gnu.org; Thu, 31 Mar 2016 13:41:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1algb8-0002IW-Gy for emacs-devel@gnu.org; Thu, 31 Mar 2016 13:41:38 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1algb8-0002IS-DT; Thu, 31 Mar 2016 13:41:34 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1912 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1algb7-0000CK-JO; Thu, 31 Mar 2016 13:41:34 -0400 In-reply-to: (message from Stefan Monnier on Thu, 31 Mar 2016 13:11:25 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:202520 Archived-At: > From: Stefan Monnier > Date: Thu, 31 Mar 2016 13:11:25 -0400 > Cc: emacs-devel@gnu.org > > > Internally, sd_listen_fds() checks whether the $LISTEN_PID environment > > variable equals the daemon PID. If not, it returns > > immediately. Otherwise, it parses the number passed in the $LISTEN_FDS > > environment variable, then sets the FD_CLOEXEC flag for the parsed > > number of file descriptors starting from SD_LISTEN_FDS_START. Finally, > > it returns the parsed number. > > Then I think it would be better to follow an approach like the one with > which you started (i.e. without the internal systemd_socket variable), The original patch included the internal variable. And I object to exposing file descriptors to Lisp, certainly when that is not necessary.