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: Lost socket for detached Emacs, how to regain control? Date: Fri, 7 Nov 2008 07:48:46 +0100 Message-ID: <18707.58574.606841.540012@a1ihome1.kph.uni-mainz.de> 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 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1226040555 26510 80.91.229.12 (7 Nov 2008 06:49:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Nov 2008 06:49:15 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 07 07:50:18 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 1KyLAf-0002Lg-CH for ged-emacs-devel@m.gmane.org; Fri, 07 Nov 2008 07:50:17 +0100 Original-Received: from localhost ([127.0.0.1]:43556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KyL9Y-0004DG-0L for ged-emacs-devel@m.gmane.org; Fri, 07 Nov 2008 01:49:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KyL9P-0004Az-7n for emacs-devel@gnu.org; Fri, 07 Nov 2008 01:48:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KyL9N-00048t-1H for emacs-devel@gnu.org; Fri, 07 Nov 2008 01:48:58 -0500 Original-Received: from [199.232.76.173] (port=58833 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KyL9M-00048d-NH for emacs-devel@gnu.org; Fri, 07 Nov 2008 01:48:56 -0500 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:41866) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KyL9M-0002Od-BJ for emacs-devel@gnu.org; Fri, 07 Nov 2008 01:48:56 -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 mA76ml4p004616; Fri, 7 Nov 2008 07:48:47 +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 mA76mlau005100; Fri, 7 Nov 2008 07:48:47 +0100 Original-Received: (from ulm@localhost) by a1ihome1.kph.uni-mainz.de (8.14.0/8.14.0/Submit) id mA76mkmI005095; Fri, 7 Nov 2008 07:48:46 +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:105427 Archived-At: >>>>> On Wed, 05 Nov 2008, Stefan Monnier wrote: >> 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. Or both? The server process or socket could be non-functional for other reasons. In case server-start is changed, maybe an option to force a restart should be added. Ulrich