From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: Emacs daemon dies at Xorg crash Date: Wed, 17 Dec 2008 09:08:43 -0800 (PST) Message-ID: <200812171708.mBHH8hPO008789@mothra.ics.uci.edu> References: <1229454957.21129.0.camel@localhost> <18760.56870.137654.853165@a1ihome1.kph.uni-mainz.de> <87k59yssad.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1229534331 28689 80.91.229.12 (17 Dec 2008 17:18:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Dec 2008 17:18:51 +0000 (UTC) Cc: Ulrich Mueller , =?utf-8?Q?Diego_E=2E_'Flameeyes'_Pet?= =?utf-8?Q?ten=C3=B2?= , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 17 18:19: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 1LD03b-0002mE-Vq for ged-emacs-devel@m.gmane.org; Wed, 17 Dec 2008 18:19:36 +0100 Original-Received: from localhost ([127.0.0.1]:43648 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LD02P-0001sp-LZ for ged-emacs-devel@m.gmane.org; Wed, 17 Dec 2008 12:18:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCztI-0006z6-Ge for emacs-devel@gnu.org; Wed, 17 Dec 2008 12:08:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCztH-0006xP-Ao for emacs-devel@gnu.org; Wed, 17 Dec 2008 12:08:55 -0500 Original-Received: from [199.232.76.173] (port=35847 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCztH-0006x6-41 for emacs-devel@gnu.org; Wed, 17 Dec 2008 12:08:55 -0500 Original-Received: from barrelv2.ics.uci.edu ([128.195.1.114]:53332) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1LCztG-00071F-Gl for emacs-devel@gnu.org; Wed, 17 Dec 2008 12:08:54 -0500 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id mBHH8ivO022127; Wed, 17 Dec 2008 09:08:45 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id mBHH8hPO008789; Wed, 17 Dec 2008 09:08:43 -0800 (PST) In-Reply-To: <87k59yssad.fsf@cyd.mit.edu> (Chong Yidong's message of "Wed, 17 Dec 2008 11:03:22 -0500") Original-Lines: 39 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: mBHH8ivO022127 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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:107011 Archived-At: Chong Yidong writes: > Ulrich Mueller writes: > > > AFAICS Emacs only dies if there's no other connection open. I've > > tested it with another client open on a tty, and Emacs survived. > > > > The last thing it outputs is "Connection lost to X server `:0.0'", so > > it passes through x_io_error_quitter, which in turn will call > > x_connection_closed. > > > > In x_connection_closed there are two tests for the last terminal, > > where shut_down_emacs is called. Probably this should be modified for > > the daemon case? > > I'm not sure this is the problem. The two tests you mention are > > if (terminal_list->next_terminal == NULL) > > where terminal_list points to the X terminal about to be deleted, and > > if (terminal_list == 0) > > after the deletion of the terminal. Unless the code has changed since > the last time I looked at it, Emacs uses an initial terminal, which > neither sends nor receives anything, when it is run as a daemon; the > existence of this initial terminal should prevent shut_down_emacs from > being called. Agreed. There wasn't enough context in the initial mail, but I suspect this is an emacs compiled with Gtk+. It works (and it has always done so) perfectly well for me when using Lucid. There's a long standing Gtk+ bug: http://bugzilla.gnome.org/show_bug.cgi?id=85715 that creates problems with closing the display for Emacs from time to time. Jan has put in a few workarounds, but the bug in Gtk+ still exists.