diff options
| author | Michael Albinus | 2022-04-08 12:47:53 +0200 |
|---|---|---|
| committer | Michael Albinus | 2022-04-08 12:47:53 +0200 |
| commit | d9851c6df2d5b5e950329968ac268a06ef4adfbf (patch) | |
| tree | 769a128f774fb72f1d42957ce6b985bb6f309e30 /lisp | |
| parent | c4921d1157a2e3e15b1d779a6bdf768e307275dd (diff) | |
| download | emacs-d9851c6df2d5b5e950329968ac268a06ef4adfbf.tar.gz emacs-d9851c6df2d5b5e950329968ac268a06ef4adfbf.zip | |
Ensure local `default-directory' when calling `process-attributes'.
* lisp/server.el (server-running-p):
* lisp/subr.el (memory-limit): Ensure local `default-directory'
when calling `process-attributes'.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/server.el | 3 | ||||
| -rw-r--r-- | lisp/subr.el | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lisp/server.el b/lisp/server.el index da60f1cda77..763cf27f7ac 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -779,7 +779,8 @@ by the current Emacs process, use the `server-process' variable." | |||
| 779 | (condition-case nil | 779 | (condition-case nil |
| 780 | (if server-use-tcp | 780 | (if server-use-tcp |
| 781 | (with-temp-buffer | 781 | (with-temp-buffer |
| 782 | (insert-file-contents-literally (expand-file-name name server-auth-dir)) | 782 | (setq default-directory server-auth-dir) |
| 783 | (insert-file-contents-literally (expand-file-name name)) | ||
| 783 | (or (and (looking-at "127\\.0\\.0\\.1:[0-9]+ \\([0-9]+\\)") | 784 | (or (and (looking-at "127\\.0\\.0\\.1:[0-9]+ \\([0-9]+\\)") |
| 784 | (assq 'comm | 785 | (assq 'comm |
| 785 | (process-attributes | 786 | (process-attributes |
diff --git a/lisp/subr.el b/lisp/subr.el index 34f7bb6888a..e7d5d36461c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2719,7 +2719,8 @@ It can be retrieved with `(process-get PROCESS PROPNAME)'." | |||
| 2719 | 2719 | ||
| 2720 | (defun memory-limit () | 2720 | (defun memory-limit () |
| 2721 | "Return an estimate of Emacs virtual memory usage, divided by 1024." | 2721 | "Return an estimate of Emacs virtual memory usage, divided by 1024." |
| 2722 | (or (cdr (assq 'vsize (process-attributes (emacs-pid)))) 0)) | 2722 | (let ((default-directory temporary-file-directory)) |
| 2723 | (or (cdr (assq 'vsize (process-attributes (emacs-pid)))) 0))) | ||
| 2723 | 2724 | ||
| 2724 | 2725 | ||
| 2725 | ;;;; Input and display facilities. | 2726 | ;;;; Input and display facilities. |