[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/5] When set, use the systemd socket descriptor.

From: Matthew Leach
Subject: [PATCH 5/5] When set, use the systemd socket descriptor.
Date: Sat, 26 Mar 2016 21:16:42 +0000

* 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]