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: bug in server-start Date: Tue, 16 Dec 2008 08:03:54 +0100 Message-ID: <18759.21210.387155.565065@a1ihome1.kph.uni-mainz.de> References: <18758.7352.558182.931572@kahikatea.snap.net.nz> <18758.14760.572830.277734@kahikatea.snap.net.nz> <200812151724.mBFHOSnS029425@mothra.ics.uci.edu> 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 1229411089 25266 80.91.229.12 (16 Dec 2008 07:04:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Dec 2008 07:04:49 +0000 (UTC) Cc: Nick Roberts , Dan Nicolaescu , Stefan Monnier , emacs-devel@gnu.org To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 16 08:05:55 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 1LCTzj-0001h2-HS for ged-emacs-devel@m.gmane.org; Tue, 16 Dec 2008 08:05:52 +0100 Original-Received: from localhost ([127.0.0.1]:38267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCTyX-000454-CG for ged-emacs-devel@m.gmane.org; Tue, 16 Dec 2008 02:04:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCTyT-00044a-1Z for emacs-devel@gnu.org; Tue, 16 Dec 2008 02:04:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCTyP-000438-Gm for emacs-devel@gnu.org; Tue, 16 Dec 2008 02:04:08 -0500 Original-Received: from [199.232.76.173] (port=42488 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCTyP-000435-DU for emacs-devel@gnu.org; Tue, 16 Dec 2008 02:04:05 -0500 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:33403) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LCTyO-0002Xg-Q4 for emacs-devel@gnu.org; Tue, 16 Dec 2008 02:04:05 -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 mBG73tuD029699; Tue, 16 Dec 2008 08:03:55 +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 mBG73tZj028406; Tue, 16 Dec 2008 08:03:55 +0100 Original-Received: (from ulm@localhost) by a1ihome1.kph.uni-mainz.de (8.14.0/8.14.0/Submit) id mBG73sbe028398; Tue, 16 Dec 2008 08:03:54 +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:106955 Archived-At: >>>>> On Mon, 15 Dec 2008, Juanma Barranquero wrote: > On Mon, Dec 15, 2008 at 18:24, Dan Nicolaescu wrote: >> We could install something by default to restart the server when >> receiving an USR1 or USR2 signal. > That was discussed a while ago, IIRC. Why wasn't it installed? As far as I've understood, Stefan didn't find it very useful. So I've added the following to Gentoo site initialisation, if Emacs is running as a daemon: (define-key special-event-map [sigusr1] 'server-start) >> Also currently the daemon is broken: >> >> emacs -Q -f server-start& >> >> emacs --daemon >> Server "server" is already running >> >> and the daemon is not started... > Do you mean, I suppose, that Emacs starts but it is not responsive > because it is running no server? > How do you propose to fix it? We can make --daemon to do the > equivalent of "(progn (server-force-delete) (server-start))", Hm, this doesn't look very consistent to me, because the behaviour is different from starting a second server. > or exit with an error if there's a name-matching server. Other > ideas? Exit with an error, please. And if possible, the parent process should return a nonzero exit status. (AFAICS, not calling daemon-initialized should be sufficient for this, but I haven't tested it.) If users want a daemon to take precedence over a "normal" server (i.e. your first suggestion), they can still put a (server-force-delete) into their .emacs or site-start.el. Ulrich