1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00

Fix server-socket-dir initialization (rep. by Friedrich Delgado Friedrichs).

lisp/server.el (server-socket-dir): Remove premature initialization.
(server-start): Initialize server-socket-dir with the correct uid.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-175
This commit is contained in:
Karoly Lorentey 2004-05-25 01:18:01 +00:00
parent ab48547856
commit fc0dcdef8f

View File

@ -161,8 +161,9 @@ are done with it in the server.")
(defvar server-name "server")
(defvar server-socket-dir
(format "/tmp/emacs%d" (user-uid)))
(defvar server-socket-dir nil
"The directory in which to place the server socket.
Initialized by `server-start'.")
(defun server-client (proc)
"Return the Emacs client corresponding to PROC.
@ -367,6 +368,9 @@ Emacs distribution as your standard \"editor\".
Prefix arg means just kill any existing server communications subprocess."
(interactive "P")
;; It is safe to get the user id now.
(setq server-socket-dir (or server-socket-dir
(format "/tmp/emacs%d" (user-uid))))
;; Make sure there is a safe directory in which to place the socket.
(server-ensure-safe-dir server-socket-dir)
;; kill it dead!