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: Fri, 07 Nov 2008 09:39:54 -0500 Message-ID: References: <18704.27377.815630.316648@a1ihome1.kph.uni-mainz.de> <18707.58574.606841.540012@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 1226068824 22670 80.91.229.12 (7 Nov 2008 14:40:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Nov 2008 14:40:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ulrich Mueller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 07 15:41:20 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 1KySWP-00027N-Vv for ged-emacs-devel@m.gmane.org; Fri, 07 Nov 2008 15:41:14 +0100 Original-Received: from localhost ([127.0.0.1]:37862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KySVI-0003xE-Jh for ged-emacs-devel@m.gmane.org; Fri, 07 Nov 2008 09:40:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KySVD-0003wh-4N for emacs-devel@gnu.org; Fri, 07 Nov 2008 09:39:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KySVB-0003vm-In for emacs-devel@gnu.org; Fri, 07 Nov 2008 09:39:58 -0500 Original-Received: from [199.232.76.173] (port=54070 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KySVB-0003vj-Fv for emacs-devel@gnu.org; Fri, 07 Nov 2008 09:39:57 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:22096 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KySVB-0000zM-5d for emacs-devel@gnu.org; Fri, 07 Nov 2008 09:39:57 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtcEANThE0lMCqyo/2dsb2JhbACBdsdeg1aBEA X-IronPort-AV: E=Sophos;i="4.33,564,1220241600"; d="scan'208";a="29521222" Original-Received: from 76-10-172-168.dsl.teksavvy.com (HELO pastel.home) ([76.10.172.168]) by ironport2-out.teksavvy.com with ESMTP; 07 Nov 2008 09:39:55 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 519567F94; Fri, 7 Nov 2008 09:39:54 -0500 (EST) In-Reply-To: <18707.58574.606841.540012@a1ihome1.kph.uni-mainz.de> (Ulrich Mueller's message of "Fri, 7 Nov 2008 07:48:46 +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:105443 Archived-At: >>> 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. If you want. I don't find the feature of "sigusr1 causes server-restart" very useful, since in the rare remaining cases where the problem may happen, you may as well kill the server process altogether and start a new one. But I wouldn't care to oppose it either. Stefan