Commit 35f372ca authored by Juanma Barranquero's avatar Juanma Barranquero

* server.el (server-start): If unable to start the server,

  display a warning instead of raising an error.

* startup.el (server-process): Add defvar.
  (command-line): If the daemon is unable to start the server,
  display a message and exit Emacs.
parent eec5eead
2008-12-16 Juanma Barranquero <lekktu@gmail.com>
* server.el (server-start): If unable to start the server,
display a warning instead of raising an error.
* startup.el (server-process): Add defvar.
(command-line): If the daemon is unable to start the server,
display a message and exit Emacs.
2008-12-15 Sam Steingold <sds@gnu.org>
* progmodes/cc-cmds.el (c-defun-name): Handle DEFFOO(name,...),
......
......@@ -479,14 +479,17 @@ To force-start a server, do \\[server-force-delete] and then
;; Remove any leftover socket or authentication file
(ignore-errors (delete-file server-file))
(setq server-mode nil) ;; already set by the minor mode code
(error "Server %S is already running" server-name))
(display-warning 'server
(format "Emacs server named %S already running" server-name)
:warning)
(setq leave-dead t))
;; If this Emacs already had a server, clear out associated status.
(while server-clients
(server-delete-client (car server-clients)))
;; Now any previous server is properly stopped.
(if leave-dead
(progn
(server-log (message "Server stopped"))
(unless (eq t leave-dead) (server-log (message "Server stopped")))
(setq server-process nil))
;; Make sure there is a safe directory in which to place the socket.
(server-ensure-safe-dir server-dir)
......
......@@ -694,6 +694,7 @@ opening the first frame (e.g. open a connection to an X server).")
(declare-function tool-bar-setup "tool-bar")
(defvar server-name)
(defvar server-process)
(defun command-line ()
(setq before-init-time (current-time)
......@@ -1220,7 +1221,10 @@ the `--debug-init' option to view a complete error backtrace."
(when dn
(when (stringp dn) (setq server-name dn))
(server-start)
(daemon-initialized)))
(if server-process
(daemon-initialized)
(message "Unable to start daemon: Emacs server named %S already running" server-name)
(kill-emacs 1))))
;; Run emacs-session-restore (session management) if started by
;; the session manager and we have a session manager connection.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment