summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2018-02-17 08:37:43 -0500
committerMario Rodas <marsam@users.noreply.github.com>2018-02-17 08:48:03 -0500
commitfcbccec6ec0f6639eab769d6ff8e97f25347a48e (patch)
tree2cdabd267881096d204ddd10a9945101eee73d47
parentf401e12316f1db871b7c194696ff3f4e7e5bf347 (diff)
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.
-rw-r--r--with-editor.el2
1 files changed, 1 insertions, 1 deletions
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)