+2014-08-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ Avoid 100% CPU utilization on ssh session exit (Bug#17691).
+ * xterm.h (struct x_display_info): New member 'connection'.
+ * xterm.c (x_term_init, x_delete_terminal): Set and use it,
+ so that x_delete_terminal has a file descriptor to pass to
+ delete_keyboard_wait_descriptor.
+
2014-08-01 Eli Zaretskii <eliz@gnu.org>
Fix display of R2L lines when the last character fits only partially.
dpyinfo->name_list_element = Fcons (display_name, Qnil);
dpyinfo->display = dpy;
+ dpyinfo->connection = ConnectionNumber (dpyinfo->display);
/* Set the name of the terminal. */
terminal->name = xlispstrdup (display_name);
x_delete_terminal (struct terminal *terminal)
{
struct x_display_info *dpyinfo = terminal->display_info.x;
- int connection = -1;
/* Protect against recursive calls. delete_frame in
delete_terminal calls us back when it deletes our last frame. */
and dpyinfo->display was set to 0 to indicate that. */
if (dpyinfo->display)
{
- connection = ConnectionNumber (dpyinfo->display);
-
x_destroy_all_bitmaps (dpyinfo);
XSetCloseDownMode (dpyinfo->display, DestroyAll);
}
/* No more input on this descriptor. */
- if (connection != -1)
- delete_keyboard_wait_descriptor (connection);
+ if (0 <= dpyinfo->connection)
+ delete_keyboard_wait_descriptor (dpyinfo->connection);
/* Mark as dead. */
dpyinfo->display = NULL;
+ dpyinfo->connection = -1;
x_delete_display (dpyinfo);
unblock_input ();
}
/* This says how to access this display in Xlib. */
Display *display;
+ /* A connection number (file descriptor) for the display. */
+ int connection;
+
/* This is a cons cell of the form (NAME . FONT-LIST-CACHE). */
Lisp_Object name_list_element;