From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christoph Ruegge Newsgroups: gmane.emacs.bugs Subject: bug#18375: 24.4.50; Emacs hangs X session manager logout in certain cases Date: Wed, 3 Sep 2014 11:53:28 +0200 Message-ID: References: <87y4u4euu0.fsf@cxcs.de> <1B3078FA-936D-4F4A-9187-1D6732B03763@swipnet.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1409738276 30057 80.91.229.3 (3 Sep 2014 09:57:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Sep 2014 09:57:56 +0000 (UTC) Cc: "18375@debbugs.gnu.org" <18375@debbugs.gnu.org> To: "Jan D." Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 03 11:57:48 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XP7Jx-0007nX-VN for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Sep 2014 11:57:46 +0200 Original-Received: from localhost ([::1]:43686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP7Jx-0003F7-L0 for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Sep 2014 05:57:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP7HR-0007pm-2n for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2014 05:55:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XP7HK-0008BC-Up for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2014 05:55:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP7HK-0008B2-SP for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2014 05:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XP7HK-0004Xx-I9 for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2014 05:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Christoph Ruegge Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Sep 2014 09:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18375 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 18375-submit@debbugs.gnu.org id=B18375.140973804717374 (code B ref 18375); Wed, 03 Sep 2014 09:55:02 +0000 Original-Received: (at 18375) by debbugs.gnu.org; 3 Sep 2014 09:54:07 +0000 Original-Received: from localhost ([127.0.0.1]:57501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XP7GQ-0004W9-Bm for submit@debbugs.gnu.org; Wed, 03 Sep 2014 05:54:06 -0400 Original-Received: from mail-ob0-f176.google.com ([209.85.214.176]:43961) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XP7GO-0004Vf-C5 for 18375@debbugs.gnu.org; Wed, 03 Sep 2014 05:54:04 -0400 Original-Received: by mail-ob0-f176.google.com with SMTP id wn1so5843764obc.35 for <18375@debbugs.gnu.org>; Wed, 03 Sep 2014 02:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=7EQkO2+8O9sApAHCtIdthnYscDJnA8QOJs5d0/HFdRQ=; b=eqqmKKNKLPhBYdaeNr5S9+3vtssIvL1ofdeseck/2Bn3ktsTKfqFT2Wn3gCuiW3EnP eMDrGdmuF1r4iECgYX/TVgiu+Cml0UpsOftEwJoYzLaRbtO4JA3I+Zn8VBL+aVL7kQWd BwCutIB1rzbqqXg8MidEgAoHU9QxbXY17FzxeikgBIgnNoPxsLpl3vtByLoixePZrfLf lTGDuta35H2YXl8UnGM7MKRp2C5BMWVBLO7BqD1qPMg0dovKWDlCYkQLqfTIUCm71E0J WvfQ+vlqZua6ewa3M3j7u+7JMmocTuQQrDRiiGHI6SaSfPoHDBFIp6RA6oog6MW8cK9E pEJQ== X-Received: by 10.60.130.170 with SMTP id of10mr19495627oeb.10.1409738038587; Wed, 03 Sep 2014 02:53:58 -0700 (PDT) Original-Received: by 10.183.16.133 with HTTP; Wed, 3 Sep 2014 02:53:28 -0700 (PDT) In-Reply-To: <1B3078FA-936D-4F4A-9187-1D6732B03763@swipnet.se> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92990 Archived-At: >>> If I may add, the current behaviour is rather weird to begin with. The >>> SM integration's purpose is to cleanly shutdown Emacs on logout, so it >>> should be tied to the entire process and not to a particular terminal. > > > No. The reason is to have Emacs restarted when the user logs in again. > Logout is no problem, the X connection will go away. But that is not necessarily the only function of a session manager (some SMs aren't even set to restart applications by default). They also give applications the opportunity to query the user about unsaved changes and such things. Now Emacs does not do that, but it's fairly simple to do implement using `emacs-save-session-functions'. Additionally, the only reason for me to log out is usually to restart the computer, so Emacs will get killed anyway. Having the opportunity to query about potential data loss may be useful. That being said, I realize that my patch is rather intrusive and that the more minimal solution of the daemon not using the SM at all is better, especially since the daemon _can_ survive losing the X connection (maybe in case of an X crash), which would lead to unexpected behaviour in the next session. So one simply has to rely on something like auto-save to prevent data loss. Still, there's a corner case of the same bug occuring in non-daemon mode, since it's technically possible to close the first terminal after using e.g. "emacsclient -t", though that is likely a rather rare situation.