[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error in server-running-p on M$
From: |
Eli Zaretskii |
Subject: |
Re: error in server-running-p on M$ |
Date: |
Sat, 22 Nov 2008 15:53:43 +0200 |
> Date: Sat, 22 Nov 2008 14:37:02 +0100
> From: "Juanma Barranquero" <address@hidden>
> Cc: address@hidden
>
> He said: "Currently it's not used (except in some people's .emacs).
> The intended use is in start-server to try and prevent hijacking the
> socket of a pre-existing server." But that is just part of the
> answer, I think.
I'm okay with going with this partial answer.
> Index: lisp/server.el
> ===================================================================
> RCS file: /sources/emacs/emacs/lisp/server.el,v
> retrieving revision 1.173
> diff -u -2 -r1.173 server.el
> --- lisp/server.el 5 Nov 2008 21:16:17 -0000 1.173
> +++ lisp/server.el 7 Nov 2008 15:37:36 -0000
> @@ -537,5 +537,15 @@
> (unless name (setq name server-name))
> (condition-case nil
> - (progn
> + (if server-use-tcp
> + (with-temp-buffer
> + (insert-file-contents-literally
> + (expand-file-name server-name server-auth-dir))
> + (and (looking-at "127\.0\.0\.1:[0-9]+ \\([0-9]+\\)")
> + (let ((case-fold-search t)
> + (proc (assq 'comm
> + (system-process-attributes
> + (string-to-number (match-string 1))))))
> + (and proc
> + (string-match-p "emacs" (cdr proc))))))
> (delete-process
> (make-network-process
>
Does anyone see any problems with this change? If not, I suggest to
install it.
- error in server-running-p on M$, dhruva, 2008/11/22
- Re: error in server-running-p on M$, Juanma Barranquero, 2008/11/22
- Re: error in server-running-p on M$, Eli Zaretskii, 2008/11/22
- Re: error in server-running-p on M$, Juanma Barranquero, 2008/11/22
- Re: error in server-running-p on M$, Eli Zaretskii, 2008/11/22
- Re: error in server-running-p on M$, Juanma Barranquero, 2008/11/22
- Re: error in server-running-p on M$,
Eli Zaretskii <=
- Re: error in server-running-p on M$, Ulrich Mueller, 2008/11/22
- Re: error in server-running-p on M$, Juanma Barranquero, 2008/11/22
- Re: error in server-running-p on M$, Ulrich Mueller, 2008/11/22
- Re: error in server-running-p on M$, Juanma Barranquero, 2008/11/22
- Re: error in server-running-p on M$, Ulrich Mueller, 2008/11/22
- Re: error in server-running-p on M$, Juanma Barranquero, 2008/11/22
- Re: error in server-running-p on M$, Ulrich Mueller, 2008/11/22
- Re: error in server-running-p on M$, Juanma Barranquero, 2008/11/22
- Re: error in server-running-p on M$, dhruva, 2008/11/22
- Re: error in server-running-p on M$, Juanma Barranquero, 2008/11/22