emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r116053: Provisional fix for bug #16479 with client


From: Eli Zaretskii
Subject: [Emacs-diffs] trunk r116053: Provisional fix for bug #16479 with client connecting while in a TTY menu.
Date: Fri, 17 Jan 2014 11:55:51 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116053
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16479
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2014-01-17 13:55:00 +0200
message:
  Provisional fix for bug #16479 with client connecting while in a TTY menu.
  
   src/menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
   switch to single keyboard.  Prevents daemon crashes when a new
   client connects while we show a TTY menu in an existing client.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/menu.c                     menu.c-20091113204419-o5vbwnq5f7feedwu-8676
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-01-15 17:56:40 +0000
+++ b/src/ChangeLog     2014-01-17 11:55:00 +0000
@@ -1,3 +1,10 @@
+2014-01-17  Eli Zaretskii  <address@hidden>
+
+       * menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
+       switch to single keyboard.  Prevents daemon crashes when a new
+       client connects while we show a TTY menu in an existing client.
+       (Bug#16479)
+
 2014-01-14  Paul Eggert  <address@hidden>
 
        Fix MinGW64 porting problem with _setjmp.

=== modified file 'src/menu.c'
--- a/src/menu.c        2014-01-01 07:43:34 +0000
+++ b/src/menu.c        2014-01-17 11:55:00 +0000
@@ -1443,8 +1443,16 @@
   else
 #endif
   if (FRAME_TERMCAP_P (f))
-    selection = tty_menu_show (f, xpos, ypos, for_click, keymaps, title,
-                              kbd_menu_navigation, &error_name);
+    {
+      ptrdiff_t count1 = SPECPDL_INDEX ();
+
+      /* Avoid crashes if, e.g., another client will connect while we
+        are in a menu.  */
+      temporarily_switch_to_single_kboard (f);
+      selection = tty_menu_show (f, xpos, ypos, for_click, keymaps, title,
+                                kbd_menu_navigation, &error_name);
+      unbind_to (count1, Qnil);
+    }
 
 #ifdef HAVE_NS
   unbind_to (specpdl_count, Qnil);


reply via email to

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