From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Lost socket for detached Emacs, how to regain control? Date: Thu, 06 Nov 2008 09:15:03 -0500 Message-ID: References: <18704.27377.815630.316648@a1ihome1.kph.uni-mainz.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1225980942 31648 80.91.229.12 (6 Nov 2008 14:15:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Nov 2008 14:15:42 +0000 (UTC) Cc: Ulrich Mueller , emacs-devel@gnu.org To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 06 15:16:41 2008 connect(): Connection refused 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 1Ky5en-0002lO-Ll for ged-emacs-devel@m.gmane.org; Thu, 06 Nov 2008 15:16:21 +0100 Original-Received: from localhost ([127.0.0.1]:36069 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ky5dg-0003UY-30 for ged-emacs-devel@m.gmane.org; Thu, 06 Nov 2008 09:15:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ky5da-0003Sd-RZ for emacs-devel@gnu.org; Thu, 06 Nov 2008 09:15:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ky5dZ-0003Qf-UW for emacs-devel@gnu.org; Thu, 06 Nov 2008 09:15:06 -0500 Original-Received: from [199.232.76.173] (port=40554 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ky5dZ-0003QF-Nt for emacs-devel@gnu.org; Thu, 06 Nov 2008 09:15:05 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:8929 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ky5dZ-00073X-Ng for emacs-devel@gnu.org; Thu, 06 Nov 2008 09:15:05 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtMEAHiKEklMCqyo/2dsb2JhbACBdcdng1WBEA X-IronPort-AV: E=Sophos;i="4.33,557,1220241600"; d="scan'208";a="29442659" Original-Received: from 76-10-172-168.dsl.teksavvy.com (HELO pastel.home) ([76.10.172.168]) by ironport2-out.teksavvy.com with ESMTP; 06 Nov 2008 09:15:03 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 180EE7F94; Thu, 6 Nov 2008 09:15:03 -0500 (EST) In-Reply-To: (Juanma Barranquero's message of "Thu, 6 Nov 2008 10:47:25 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:105417 Archived-At: >> Another option is for server-start to try and detect that there's >> already an active socket (using server-running-p) and refuse >> to start. > That would be useful even for local servers using TCP sockets, but > server-running-p currently does work only for local sockets. Indeed, for TCP sockets it would be useful as well, but it risks suffering from a long timeout. > The following is a simple way to at least know whether there's a > process called Emacs with the same pid that is stored in the > authentication file. That's a good alternative, tho it should check somehow that the server is supposed to run on the same machine. Stefan