From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.devel Subject: Re: error in server-running-p on M$ Date: Sat, 22 Nov 2008 15:13:10 +0100 Message-ID: <18728.4982.765983.511070@a1ihome1.kph.uni-mainz.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1227363555 21046 80.91.229.12 (22 Nov 2008 14:19:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2008 14:19:15 +0000 (UTC) Cc: Juanma Barranquero , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 22 15:20:17 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L3tKd-00012R-5m for ged-emacs-devel@m.gmane.org; Sat, 22 Nov 2008 15:19:31 +0100 Original-Received: from localhost ([127.0.0.1]:37700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3tJU-0002es-0z for ged-emacs-devel@m.gmane.org; Sat, 22 Nov 2008 09:18:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3tJQ-0002en-1r for emacs-devel@gnu.org; Sat, 22 Nov 2008 09:18:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3tJO-0002eb-It for emacs-devel@gnu.org; Sat, 22 Nov 2008 09:18:15 -0500 Original-Received: from [199.232.76.173] (port=55456 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3tJO-0002eY-BQ for emacs-devel@gnu.org; Sat, 22 Nov 2008 09:18:14 -0500 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:35861) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L3tEX-0002GW-MX; Sat, 22 Nov 2008 09:13:14 -0500 Original-Received: from a1ihome1.kph.uni-mainz.de (a1ihome1.kph.uni-mainz.de [134.93.134.75]) by a1iwww1.kph.uni-mainz.de (8.14.0/8.13.4) with ESMTP id mAMEDBrV016856; Sat, 22 Nov 2008 15:13:11 +0100 Original-Received: from a1ihome1.kph.uni-mainz.de (localhost [127.0.0.1]) by a1ihome1.kph.uni-mainz.de (8.14.0/8.14.1) with ESMTP id mAMEDAWa019706; Sat, 22 Nov 2008 15:13:11 +0100 Original-Received: (from ulm@localhost) by a1ihome1.kph.uni-mainz.de (8.14.0/8.14.0/Submit) id mAMEDAVH019701; Sat, 22 Nov 2008 15:13:10 +0100 In-Reply-To: X-Mailer: VM 8.0.2-487 under Emacs 22.2.1 (i686-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:105954 Archived-At: >>>>> On Sat, 22 Nov 2008, Eli Zaretskii wrote: >> 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. Shouldn't it try to actually connect to the socket (in the server-use-tcp case), to find out if the server is functional? That would also be consistent with the behaviour for local sockets. Ulrich