mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08: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:
parent
ab48547856
commit
fc0dcdef8f
1 changed files with 6 additions and 2 deletions
|
|
@ -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!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue