changeset 52045:283657e79b56

(server-start): Check `server-process' is non-nil before killing it to avoid killing current buffer's process.
author John Paul Wallington <jpw@pobox.com>
date Fri, 25 Jul 2003 12:16:18 +0000
parents 79432c3dc670
children 6718a30c3752
files lisp/server.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/server.el	Fri Jul 25 07:03:21 2003 +0000
+++ b/lisp/server.el	Fri Jul 25 12:16:18 2003 +0000
@@ -249,7 +249,8 @@
   ;; Make sure there is a safe directory in which to place the socket.
   (server-ensure-safe-dir (file-name-directory server-socket-name))
   ;; kill it dead!
-  (condition-case () (delete-process server-process) (error nil))
+  (if server-process
+      (condition-case () (delete-process server-process) (error nil)))
   ;; Delete the socket files made by previous server invocations.
   (condition-case () (delete-file server-socket-name) (error nil))
   ;; If this Emacs already had a server, clear out associated status.