unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Matthew Leach <matthew@mattleach.net>
To: emacs-devel <emacs-devel@gnu.org>
Cc: Matthew Leach <matthew@mattleach.net>
Subject: [PATCH 5/5] When set, use the systemd socket descriptor.
Date: Sat, 26 Mar 2016 21:16:42 +0000	[thread overview]
Message-ID: <1459027002-13215-6-git-send-email-matthew@mattleach.net> (raw)
In-Reply-To: <1459027002-13215-1-git-send-email-matthew@mattleach.net>

* lisp/server.el (server-start): Pass in the systemd-fd number when
  calling `make-network-process'.
---
 lisp/server.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/server.el b/lisp/server.el
index 5243820..b3e24b1 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -609,7 +609,9 @@ To force-start a server, do \\[server-force-delete] and then
 	     (t (yes-or-no-p
 		 "The current server still has clients; delete them? "))))
     (let* ((server-dir (if server-use-tcp server-auth-dir server-socket-dir))
-	   (server-file (expand-file-name server-name server-dir)))
+	   (server-file (expand-file-name server-name server-dir))
+           (systemd-fd (when (systemd-socket)
+                         (systemd-socket-fd))))
       (when server-process
 	;; kill it dead!
 	(ignore-errors (delete-process server-process)))
@@ -655,6 +657,7 @@ server or call `\\[server-force-delete]' to forcibly disconnect it."))
 		       :noquery t
 		       :sentinel #'server-sentinel
 		       :filter #'server-process-filter
+		       :systemd-fd systemd-fd
 		       ;; We must receive file names without being decoded.
 		       ;; Those are decoded by server-process-filter according
 		       ;; to file-name-coding-system.  Also don't get
-- 
2.7.4




  parent reply	other threads:[~2016-03-26 21:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-26 21:16 [PATCH 0/5] Add systemd socket launching support Matthew Leach
2016-03-26 21:16 ` [PATCH 1/5] Check for libsystemd when building Emacs Matthew Leach
2016-03-26 21:16 ` [PATCH 2/5] Read the number of sockets passed by systemd Matthew Leach
2016-03-26 21:16 ` [PATCH 3/5] Permit systemd-allocated socket file-descriptors to be used Matthew Leach
2016-03-27 12:08   ` Lars Magne Ingebrigtsen
2016-03-27 12:23     ` Matthew Leach
2016-03-27 12:42       ` Andreas Schwab
2016-03-27 13:38         ` Matthew Leach
2016-03-27 13:05       ` Lars Magne Ingebrigtsen
2016-03-27 13:39         ` Matthew Leach
2016-03-26 21:16 ` [PATCH 4/5] Allow the systed socket fd to be retrieved Matthew Leach
2016-03-26 21:16 ` Matthew Leach [this message]
2016-03-27  0:47 ` [PATCH 0/5] Add systemd socket launching support Alan Mackenzie
2016-03-27  0:59   ` Alexis
2016-03-27  8:44     ` Matthew Leach
2016-03-27 11:15       ` Alexis
2016-03-27  8:41   ` Matthew Leach
2016-03-27 13:48     ` Wolfgang Jenkner
2016-03-27 13:53       ` Matthew Leach
2016-03-27 14:18         ` Wolfgang Jenkner
2016-03-27 15:49     ` Mark Oteiza
2016-03-27 18:16       ` Matthew Leach
2016-03-27 14:49 ` Eli Zaretskii
2016-03-27 15:17   ` Matthew Leach
2016-03-27 15:23     ` Eli Zaretskii
2016-03-27 17:21     ` Philipp Stephani
2016-03-27 18:10       ` Matthew Leach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1459027002-13215-6-git-send-email-matthew@mattleach.net \
    --to=matthew@mattleach.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).