Mercurial > emacs
comparison lisp/server.el @ 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 | 6958557aad9b |
children | 695cf19ef79e |
comparison
equal
deleted
inserted
replaced
52044:79432c3dc670 | 52045:283657e79b56 |
---|---|
247 Prefix arg means just kill any existing server communications subprocess." | 247 Prefix arg means just kill any existing server communications subprocess." |
248 (interactive "P") | 248 (interactive "P") |
249 ;; Make sure there is a safe directory in which to place the socket. | 249 ;; Make sure there is a safe directory in which to place the socket. |
250 (server-ensure-safe-dir (file-name-directory server-socket-name)) | 250 (server-ensure-safe-dir (file-name-directory server-socket-name)) |
251 ;; kill it dead! | 251 ;; kill it dead! |
252 (condition-case () (delete-process server-process) (error nil)) | 252 (if server-process |
253 (condition-case () (delete-process server-process) (error nil))) | |
253 ;; Delete the socket files made by previous server invocations. | 254 ;; Delete the socket files made by previous server invocations. |
254 (condition-case () (delete-file server-socket-name) (error nil)) | 255 (condition-case () (delete-file server-socket-name) (error nil)) |
255 ;; If this Emacs already had a server, clear out associated status. | 256 ;; If this Emacs already had a server, clear out associated status. |
256 (while server-clients | 257 (while server-clients |
257 (let ((buffer (nth 1 (car server-clients)))) | 258 (let ((buffer (nth 1 (car server-clients)))) |