From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: Re: error in server-running-p on M$ Date: Fri, 12 Dec 2008 01:40:10 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1229042433 4449 80.91.229.12 (12 Dec 2008 00:40:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Dec 2008 00:40:33 +0000 (UTC) Cc: Eli Zaretskii , Ulrich Mueller , emacs-devel@gnu.org To: "Stefan Monnier" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 12 01:41:35 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 1LAw61-0005x1-C0 for ged-emacs-devel@m.gmane.org; Fri, 12 Dec 2008 01:41:34 +0100 Original-Received: from localhost ([127.0.0.1]:46279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAw4p-0004TI-Bd for ged-emacs-devel@m.gmane.org; Thu, 11 Dec 2008 19:40:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAw4l-0004T2-2T for emacs-devel@gnu.org; Thu, 11 Dec 2008 19:40:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAw4j-0004Sq-Ok for emacs-devel@gnu.org; Thu, 11 Dec 2008 19:40:14 -0500 Original-Received: from [199.232.76.173] (port=37593 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAw4j-0004Sn-Ik for emacs-devel@gnu.org; Thu, 11 Dec 2008 19:40:13 -0500 Original-Received: from yx-out-1718.google.com ([74.125.44.157]:42173) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LAw4i-0002kF-9Y; Thu, 11 Dec 2008 19:40:12 -0500 Original-Received: by yx-out-1718.google.com with SMTP id 34so601863yxf.66 for ; Thu, 11 Dec 2008 16:40:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=6XxIiI5G2FV8FfsYzUoawGz2NXr2ho6sjb06RcN58ns=; b=GIJ/is6oBgtRjU9QwR3xGCjnm0VNJDo15FcIh6f5jLT2xoXuYEzS1go19h3dVmi8G7 uwH36PO+3kXWOBodBBFnoMaZ7LZmHxCEC0MqIS2A1T09XqWi9M2iZcM3ALRQH0Nppgq9 RhrtRiBVk6buxjH13EuTYFNldFyfe1Y1hrBu0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=OmoaNdyyTNWYmyVRtYQJ0UpFeHJANHeQ81e7smOvOLdjCIIP9ndjL+rSv/6bHZR8ze IfMS5cl65f/fMoSh2ZWdI218lKJo2/conMchb7mr8Z4BH0CqlEOGq9oj1eUbn0LIU6UA sRiEMlT3BXc4wLGuvMSKV+basa6adfS8tjwms= Original-Received: by 10.101.69.6 with SMTP id w6mr2504094ank.140.1229042410596; Thu, 11 Dec 2008 16:40:10 -0800 (PST) Original-Received: by 10.100.13.13 with HTTP; Thu, 11 Dec 2008 16:40:10 -0800 (PST) In-Reply-To: Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:106827 Archived-At: On Thu, Dec 11, 2008 at 19:47, Stefan Monnier wrote: > I didn't mean to leave the comment as is. Please update the comment to > say that the file *should* be ours thanks to the server-wunning-p check > in server-start. I was trying to weasel out of writing it, but you caught me ;-) >> - ;; Remove any leftover socket or authentication file. > > You've moved the subsequent line but left out this comment that goes > with it. It was not an oversight, I didn't think it was needed. I've moved it, though. > This should first stop our own server. The user will usually not run > it when our server is running, but she might do it occasionally. I've done that, and now I still dislike `server-force-delete' even more. I strongly think that a simple question on server-start would have been cleaner. Currently the function must do (server-mode -1) ;; which deletes the connection file, because of the process sentinel (condition-case nil (delete-file ...) ...) which is kind of redundant. It almost should be (if server-mode (server-mode -1) (condition-case nil ...)) but the name of the current server could be different of the one for the connection file we're trying to delete. Ugly IMHO. >> + (or (and (looking-at "127\.0\.0\.1:[0-9]+ \\([0-9]+\\)") >> + (assq 'comm >> + (system-process-attributes >> + (string-to-number (match-string 1)))) > > t) Yes, a silly oversight. Thanks. The code is now committed. Juanma