emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/with-editor fcbccec 072/140: Use process-live-p to check w


From: Jonas Bernoulli
Subject: [nongnu] elpa/with-editor fcbccec 072/140: Use process-live-p to check whether process is alive
Date: Fri, 6 Aug 2021 12:51:22 -0400 (EDT)

branch: elpa/with-editor
commit fcbccec6ec0f6639eab769d6ff8e97f25347a48e
Author: Mario Rodas <marsam@users.noreply.github.com>
Commit: Mario Rodas <marsam@users.noreply.github.com>

    Use process-live-p to check whether process is alive
    
    When `server-process` dies, it still keeps the reference to the died
    process with status `closed` and is evaluated as non-nil, therefore does
    not restart correctly in such cases.
---
 with-editor.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/with-editor.el b/with-editor.el
index e7592ad..d985d71 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -457,7 +457,7 @@ ENVVAR is provided then bind that environment variable 
instead.
     (unless (featurep 'make-network-process '(:family local))
       (setq server-use-tcp t))
     ;; Make sure the server is running.
-    (unless server-process
+    (unless (process-live-p server-process)
       (when (server-running-p server-name)
         (setq server-name (format "server%s" (emacs-pid)))
         (when (server-running-p server-name)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]