[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debbugs-tracker] bug#18375: closed (24.4.50; Emacs hangs X session mana
GNU bug Tracking System
[debbugs-tracker] bug#18375: closed (24.4.50; Emacs hangs X session manager logout in certain cases)
Thu, 04 Sep 2014 05:41:01 +0000
Your message dated Thu, 4 Sep 2014 07:40:18 +0200
with message-id <address@hidden>
and subject line Re: bug#18375: 24.4.50; Emacs hangs X session manager logout
in certain cases
has caused the debbugs.gnu.org bug report #18375,
regarding 24.4.50; Emacs hangs X session manager logout in certain cases
to be marked as done.
(If you believe you have received this mail in error, please contact
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message ---
24.4.50; Emacs hangs X session manager logout in certain cases
Sun, 31 Aug 2014 13:56:23 +0200
I experience a bug that can be produced as follows:
(1) start emacs -Q --daemon
(2) open an X frame
(3) close the frame
The result is that the session manager (KDE's, in my case) logout hangs
since Emacs does not respond to the logout signal. The bug does not
occur if I logout before closing the frame, or open other frames and
interact with Emacs in any way that does not lead to no frame being open
at any given time (I can even close the first frame). Moreover, if I
logout before opening any frame, the logout does not hang, but the Emacs
process does not terminate.
I investigated a bit and think the reason has something to do with the
way the SM communication is tied to the first opened terminal. The
connection is opened at the end of x_term_init() when the first terminal
is opened (and is an X terminal). Once the last X frame is closed, the
terminal is closed as well. I don't know precisely why this causes the
bug, since the SM connection is supposed to be shut down in
x_delete_display(), but I am pretty sure that the bug happens if and
only if the first terminal has been closed.
Far as I see, the bug occurs only on non-GTK toolkits, since for GTK the
terminal is kept open to circumvent some GTK some bug, apparently.
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. There are essentially two scenarios for the Emacs daemon: it
can be run outside a desktop session (in which case there should be no
SM connection at all) or inside (in which case the connection should
last for the lifetime of the process). A cleaner approach would
therefore maybe be to seperate the SM connection from opening and
closing the terminal and have it done at startup if the user wishes,
maybe depending on a command line parameter, the presence of the DISPLAY
variable, or after user init depending on some elisp variable. The
connection itself could maybe be done through a dummy X terminal that is
kept open all the time. I tried simpy adding a call to
`x-open-connection' to startup.el, and this indeed fixes the bug (for
one of the use cases).
I'd be willing to try to write a patch for this, but as I'm not much of
a programmer and do not really understand the way Emacs handles
displays, it would likely not be up to quality standards.
In GNU Emacs 184.108.40.206 (x86_64-unknown-linux-gnu)
of 2014-08-30 on io
Windowing system distributor `The X.Org Foundation', version 11.0.11600000
System Description: Arch Linux
`configure --prefix=/home/cs/.local --with-x-toolkit=no --without-gconf
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS NOTIFY ACL GNUTLS
LIBXML2 FREETYPE LIBOTF XFT ZLIB
--- End Message ---
--- Begin Message ---
Re: bug#18375: 24.4.50; Emacs hangs X session manager logout in certain cases
Thu, 4 Sep 2014 07:40:18 +0200
Bug fixed in trunk.
3 sep 2014 kl. 20:51 skrev Christoph Ruegge <address@hidden>:
>> The tests I done shows that the SM connection is not closed properly, ever.
> Even if you add an SmcCloseConnection() call to x_session_close()?
> Seemed to work for me.
Sure, if I change stuff it works, but not as it is.
>> 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.
> That could maybe be done in pure Elisp, I suppose. Maybe I'll try that
> if I have some spare time.
--- End Message ---
|[Prev in Thread]
||[Next in Thread]|
- [debbugs-tracker] bug#18375: closed (24.4.50; Emacs hangs X session manager logout in certain cases),
GNU bug Tracking System <=