From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#18375: 24.4.50; Emacs hangs X session manager logout in certain cases Date: Wed, 3 Sep 2014 20:40:43 +0200 Message-ID: <49A5C6F0-15EF-4F3E-B89D-C98311C3632D@swipnet.se> References: <87y4u4euu0.fsf@cxcs.de> <1B3078FA-936D-4F4A-9187-1D6732B03763@swipnet.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1409769695 26209 80.91.229.3 (3 Sep 2014 18:41:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Sep 2014 18:41:35 +0000 (UTC) Cc: "18375@debbugs.gnu.org" <18375@debbugs.gnu.org> To: Christoph Ruegge Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 03 20:41:28 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 1XPFUl-0001zD-Ns for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Sep 2014 20:41:27 +0200 Original-Received: from localhost ([::1]:47120 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPFUi-0002WC-73 for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Sep 2014 14:41:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPFUW-0002Lm-9y for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2014 14:41:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPFUO-0003EO-Qm for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2014 14:41:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPFUO-0003EE-Hw for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2014 14:41:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XPFUN-0002Nd-Rx for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2014 14:41:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Sep 2014 18:41:03 +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.14097696519121 (code B ref 18375); Wed, 03 Sep 2014 18:41:03 +0000 Original-Received: (at 18375) by debbugs.gnu.org; 3 Sep 2014 18:40:51 +0000 Original-Received: from localhost ([127.0.0.1]:58076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPFUA-0002N2-FZ for submit@debbugs.gnu.org; Wed, 03 Sep 2014 14:40:51 -0400 Original-Received: from mailfe04.swip.net ([212.247.154.97]:48236 helo=swip.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPFU7-0002Mq-2k for 18375@debbugs.gnu.org; Wed, 03 Sep 2014 14:40:48 -0400 X-T2-Spam-Status: No, hits=0.0 required=5.0 Original-Received: from hosdjarv.se (account mj138573@tele2.se [46.59.42.57] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 527659100; Wed, 03 Sep 2014 20:40:44 +0200 In-Reply-To: X-Mailer: Apple Mail (2.1878.6) 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:92997 Archived-At: Hi. 3 sep 2014 kl. 11:53 skrev Christoph Ruegge : > 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. Save state is part of the session protocol. But as daemon is supposed = to survive the session, there is no saving of state needed when the = session dies. > 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. >=20 > 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. The tests I done shows that the SM connection is not closed properly, = ever. So it is a bug. On the other hand, X style session management is kind = of deprecated. You can see this in Fedora 20, where the whole desktop dies when = emacsclient -c starts a new frame for a daemon outside the session. I = guess it looses it when a process outside the session attach to the = session (or something like that). I will fix the bug, and disable SM for daemon. As for exposing SM to lisp, that might not be a bad idea, but it would = be better to implement and expose the newer d-bus based SM than the old = X based SM. The latter will probably go away within a couple of years. = Gnome only has a compability layer for it on top of the d-bus SM. Jan D.