# HG changeset patch # User Karoly Lorentey # Date 1085447881 0 # Node ID 0c9a34bef526899772e6c09d9c0a9e73f3830ea9 # Parent 445e34bd8b6126d6e7ec28bb4f64fc162f7f3547 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 diff -r 445e34bd8b61 -r 0c9a34bef526 lisp/server.el --- a/lisp/server.el Mon May 24 23:42:52 2004 +0000 +++ b/lisp/server.el Tue May 25 01:18:01 2004 +0000 @@ -161,8 +161,9 @@ (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 @@ 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!