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: Wed, 05 Nov 2008 20:31:47 -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 1225935123 4698 80.91.229.12 (6 Nov 2008 01:32:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Nov 2008 01:32:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ulrich Mueller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 06 02:33:05 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 1Kxtk9-0000Qy-As for ged-emacs-devel@m.gmane.org; Thu, 06 Nov 2008 02:33:05 +0100 Original-Received: from localhost ([127.0.0.1]:45150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kxtj2-0007p9-30 for ged-emacs-devel@m.gmane.org; Wed, 05 Nov 2008 20:31:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kxtiy-0007mU-6F for emacs-devel@gnu.org; Wed, 05 Nov 2008 20:31:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kxtix-0007lg-Cx for emacs-devel@gnu.org; Wed, 05 Nov 2008 20:31:51 -0500 Original-Received: from [199.232.76.173] (port=43141 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kxtix-0007lY-4O for emacs-devel@gnu.org; Wed, 05 Nov 2008 20:31:51 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:1151 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kxtiw-00051O-Rz for emacs-devel@gnu.org; Wed, 05 Nov 2008 20:31:50 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AksFAFfYEUlMCqyo/2dsb2JhbACBdskhg1WBDw X-IronPort-AV: E=Sophos;i="4.33,553,1220241600"; d="scan'208";a="29418951" Original-Received: from 76-10-172-168.dsl.teksavvy.com (HELO ceviche.home) ([76.10.172.168]) by ironport2-out.teksavvy.com with ESMTP; 05 Nov 2008 20:31:48 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id DF055B410B; Wed, 5 Nov 2008 20:31:47 -0500 (EST) In-Reply-To: <18704.27377.815630.316648@a1ihome1.kph.uni-mainz.de> (Ulrich Mueller's message of "Tue, 4 Nov 2008 16:32:01 +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:105411 Archived-At: > Consider the following scenario: > - emacs --daemon is running in the background without any open frame > - server-start is also called in another Emacs process > Now there is no more way to connect to the detached Emacs. (Or am I > missing something?) > Maybe it would be feasible to add a recovery mechanism for such a > case, like binding [sigusr1] to server-start? That would be easy to do, indeed. 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. Stefan