[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

23.0.60; Emacs should survive a lost X connection

From: Harald Hanche-Olsen
Subject: 23.0.60; Emacs should survive a lost X connection
Date: Tue, 05 Feb 2008 15:58:47 +0100 (CET)

What I did: a deliberate test, not an accident -
(and my apologies in the likely case that this is well known):

I started emacs -nw, then ran M-x make-frame-on-display RET :0 RET.
After the new frame popped up on display :0 (I did all this from an
xterm not on that display), I logged out of display :0.
Emacs aborted as a result.

Here is the top of the backtrace.

; gdb /local/bin/emacs core
Core was generated by `emacs'.
Program terminated with signal 6, Aborted.
(gdb) back
#0  0x88c5eecb in kill () from /lib/libc.so.6
#1  0x080f860e in fatal_error_signal (sig=-1077966240) at emacs.c:398
#2  0x88a44f5d in sigaction () from /lib/libpthread.so.2
#3  0xbfbfff94 in ?? ()
#4  0x00000006 in ?? ()
#5  0xbfbf8e30 in ?? ()
#6  0xbfbf8b70 in ?? ()
#7  0x00000000 in ?? ()
#8  0x88a44a24 in sigaction () from /lib/libpthread.so.2
#9  0x0815a954 in internal_condition_case_2 (
    bfun=0x815d5e0 <Frun_hook_with_args>, nargs=2, args=0xbfbf8f68, 
    handlers=137623601, hfun=0x805cfe4 <delete_frame_handler>) at eval.c:1568
#10 0x0805fd91 in Fdelete_frame (frame=137838641, force=137623601)
    at frame.c:1412
#11 0x080d5266 in x_connection_closed (dpy=0x860f335, 
    error_message=0xbfbf9080 "Connection lost to X server `:0.0'")
    at xterm.c:8054

I am pretty sure this at the top of internal_condition_case_2
(eval.c:1568) is responsible:

eval.c:1568 is where it dies deliberately:
  /* Since Fsignal will close off all calls to x_catch_errors,
     we will get the wrong results if some are not closed now.  */
  if (x_catching_errors ())
    abort ();

I am guessing that the code was not written for a lost X connection to
be survivable, but perhaps I am wrong.  But if I guessed right,
consider this a feature request rather than a bug report:  For
multitty to be really useful, I think surviving a lost X connection
can be important.  Dropped connections can easily happen when
accessing the office computer from a laptop, for example.

In GNU Emacs (i386-unknown-freebsd6.2, GTK+ Version 2.12.7)
 of 2008-02-03 on fiinbeck.math.ntnu.no
Windowing system distributor `The X.Org Foundation', version 11.0.10400000
configured using `configure  '--prefix' '/local''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

(Various other stuff elided, as it did not come from the dead emacs.)

- Harald

reply via email to

[Prev in Thread] Current Thread [Next in Thread]