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 17:52:15 +0100 Message-ID: <18728.14527.648410.433140@a1ihome1.kph.uni-mainz.de> References: <18728.4982.765983.511070@a1ihome1.kph.uni-mainz.de> <18728.5963.672940.47287@a1ihome1.kph.uni-mainz.de> <18728.9899.815004.638335@a1ihome1.kph.uni-mainz.de> 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 1227372962 15654 80.91.229.12 (22 Nov 2008 16:56:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2008 16:56:02 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 22 17:57:04 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 1L3vn5-00041P-N6 for ged-emacs-devel@m.gmane.org; Sat, 22 Nov 2008 17:57:03 +0100 Original-Received: from localhost ([127.0.0.1]:50254 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3vlw-0005Uf-A2 for ged-emacs-devel@m.gmane.org; Sat, 22 Nov 2008 11:55:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3vlr-0005Sp-8A for emacs-devel@gnu.org; Sat, 22 Nov 2008 11:55:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3vlo-0005Sd-Rk for emacs-devel@gnu.org; Sat, 22 Nov 2008 11:55:45 -0500 Original-Received: from [199.232.76.173] (port=45115 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3vlo-0005Sa-MT for emacs-devel@gnu.org; Sat, 22 Nov 2008 11:55:44 -0500 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:43911) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L3viU-00072E-Ad; Sat, 22 Nov 2008 11:52:18 -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 mAMGqF4n021824; Sat, 22 Nov 2008 17:52:15 +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 mAMGqFRO025288; Sat, 22 Nov 2008 17:52:15 +0100 Original-Received: (from ulm@localhost) by a1ihome1.kph.uni-mainz.de (8.14.0/8.14.0/Submit) id mAMGqFW5025283; Sat, 22 Nov 2008 17:52:15 +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:105963 Archived-At: >>>>> On Sat, 22 Nov 2008, Juanma Barranquero wrote: >> With the proposed test, server-running-p will return nil in this case, >> since it will find an auth file but no associated Emacs process. > It only will do that if the current, local server is trying to write > an authentication file in the NFS server. If you assume that the user's home directory is NFS mounted, then this is the normal case. > Still, the point is, either we try to do a complicate, > potentially-network-delaying check, or we opt for a simple, > not-totally-reliable check. Yeah, I see the problem that one wouldn't like to have network timeouts here ... > I don't mind one way or the other (though I won't be writing the > complex one), but we should bear in mind that even if the check > fails, consequences are hardly catastrophic. Currently we don't even > check, just clobber the auth file. So any partial fix is a net > benefit, as long as we rename the function and/or write a clear > docstring stating that it cannot be assumed to be a reliable > indicator of the presence of another Emacs instance. Agreed, of course a partial fix is better than not checking at all. And I would vote against renaming the function, since I think its intention is to find out if a server is running. Even if the implementation (at the time being?) uses some heuristic that doesn't cover 100% of all cases. Another question, is the plan now to call server-running-p from server-start (and refuse to start if it is returning non-nil)? Ulrich