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'.
This commit is contained in:
parent
c4921d1157
commit
d9851c6df2
2 changed files with 4 additions and 2 deletions
|
@ -779,7 +779,8 @@ by the current Emacs process, use the `server-process' variable."
|
|||
(condition-case nil
|
||||
(if server-use-tcp
|
||||
(with-temp-buffer
|
||||
(insert-file-contents-literally (expand-file-name name server-auth-dir))
|
||||
(setq default-directory server-auth-dir)
|
||||
(insert-file-contents-literally (expand-file-name name))
|
||||
(or (and (looking-at "127\\.0\\.0\\.1:[0-9]+ \\([0-9]+\\)")
|
||||
(assq 'comm
|
||||
(process-attributes
|
||||
|
|
|
@ -2719,7 +2719,8 @@ It can be retrieved with `(process-get PROCESS PROPNAME)'."
|
|||
|
||||
(defun memory-limit ()
|
||||
"Return an estimate of Emacs virtual memory usage, divided by 1024."
|
||||
(or (cdr (assq 'vsize (process-attributes (emacs-pid)))) 0))
|
||||
(let ((default-directory temporary-file-directory))
|
||||
(or (cdr (assq 'vsize (process-attributes (emacs-pid)))) 0)))
|
||||
|
||||
|
||||
;;;; Input and display facilities.
|
||||
|
|
Loading…
Add table
Reference in a new issue