aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2014-01-17 13:55:00 +0200
committerEli Zaretskii2014-01-17 13:55:00 +0200
commit20adfbd8eaf2427526b582b60db74e0b408e0874 (patch)
treed0e9fef05fdaa746986af12a9775755797c47aaa /src
parent160630163c0c14591ad77164ac640581bfb7b503 (diff)
downloademacs-20adfbd8eaf2427526b582b60db74e0b408e0874.tar.gz
emacs-20adfbd8eaf2427526b582b60db74e0b408e0874.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/menu.c12
2 files changed, 17 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6998df7b625..d36e60a4e95 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12014-01-17 Eli Zaretskii <eliz@gnu.org>
2
3 * menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
4 switch to single keyboard. Prevents daemon crashes when a new
5 client connects while we show a TTY menu in an existing client.
6 (Bug#16479)
7
12014-01-14 Paul Eggert <eggert@cs.ucla.edu> 82014-01-14 Paul Eggert <eggert@cs.ucla.edu>
2 9
3 Fix MinGW64 porting problem with _setjmp. 10 Fix MinGW64 porting problem with _setjmp.
diff --git a/src/menu.c b/src/menu.c
index dc3198faf0e..c38152f47e8 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1443,8 +1443,16 @@ no quit occurs and `x-popup-menu' returns nil. */)
1443 else 1443 else
1444#endif 1444#endif
1445 if (FRAME_TERMCAP_P (f)) 1445 if (FRAME_TERMCAP_P (f))
1446 selection = tty_menu_show (f, xpos, ypos, for_click, keymaps, title, 1446 {
1447 kbd_menu_navigation, &error_name); 1447 ptrdiff_t count1 = SPECPDL_INDEX ();
1448
1449 /* Avoid crashes if, e.g., another client will connect while we
1450 are in a menu. */
1451 temporarily_switch_to_single_kboard (f);
1452 selection = tty_menu_show (f, xpos, ypos, for_click, keymaps, title,
1453 kbd_menu_navigation, &error_name);
1454 unbind_to (count1, Qnil);
1455 }
1448 1456
1449#ifdef HAVE_NS 1457#ifdef HAVE_NS
1450 unbind_to (specpdl_count, Qnil); 1458 unbind_to (specpdl_count, Qnil);