diff options
| author | Karoly Lorentey | 2004-05-25 01:18:01 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-05-25 01:18:01 +0000 |
| commit | fc0dcdef8f78c83808b94251aed23459ad75178c (patch) | |
| tree | 72a7a7e38c9bbf9bc54839fe04c31fe76de83337 | |
| parent | ab485478568fb7841ab3e21a33dda44a97257bfb (diff) | |
| download | emacs-fc0dcdef8f78c83808b94251aed23459ad75178c.tar.gz emacs-fc0dcdef8f78c83808b94251aed23459ad75178c.zip | |
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
| -rw-r--r-- | lisp/server.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/server.el b/lisp/server.el index 9758ac1a7cb..620d4a7e5fa 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -161,8 +161,9 @@ are done with it in the server.") | |||
| 161 | 161 | ||
| 162 | (defvar server-name "server") | 162 | (defvar server-name "server") |
| 163 | 163 | ||
| 164 | (defvar server-socket-dir | 164 | (defvar server-socket-dir nil |
| 165 | (format "/tmp/emacs%d" (user-uid))) | 165 | "The directory in which to place the server socket. |
| 166 | Initialized by `server-start'.") | ||
| 166 | 167 | ||
| 167 | (defun server-client (proc) | 168 | (defun server-client (proc) |
| 168 | "Return the Emacs client corresponding to PROC. | 169 | "Return the Emacs client corresponding to PROC. |
| @@ -367,6 +368,9 @@ Emacs distribution as your standard \"editor\". | |||
| 367 | 368 | ||
| 368 | Prefix arg means just kill any existing server communications subprocess." | 369 | Prefix arg means just kill any existing server communications subprocess." |
| 369 | (interactive "P") | 370 | (interactive "P") |
| 371 | ;; It is safe to get the user id now. | ||
| 372 | (setq server-socket-dir (or server-socket-dir | ||
| 373 | (format "/tmp/emacs%d" (user-uid)))) | ||
| 370 | ;; Make sure there is a safe directory in which to place the socket. | 374 | ;; Make sure there is a safe directory in which to place the socket. |
| 371 | (server-ensure-safe-dir server-socket-dir) | 375 | (server-ensure-safe-dir server-socket-dir) |
| 372 | ;; kill it dead! | 376 | ;; kill it dead! |