From: Po Lu Date: Tue, 20 Dec 2022 07:42:26 +0000 (+0800) Subject: Improve safety of calls to vendor-specific-keysyms X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f47419766d219b043ed368c062e40dc78e41ed6e;p=emacs.git Improve safety of calls to vendor-specific-keysyms * src/xterm.c (x_term_init): Wrap call to vendor-specific-keysyms inside safe_call. --- diff --git a/src/xterm.c b/src/xterm.c index a1acfa80744..60d48165650 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -29894,13 +29894,17 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) { char *vendor = ServerVendor (dpy); - /* Temporarily hide the partially initialized terminal. */ + /* Temporarily hide the partially initialized terminal. + Use safe_call so that if a signal happens, a partially + initialized display (and display connection) is not + kept around. */ terminal_list = terminal->next_terminal; unblock_input (); - kset_system_key_alist - (terminal->kboard, - call1 (Qvendor_specific_keysyms, - vendor ? build_string (vendor) : empty_unibyte_string)); + kset_system_key_alist (terminal->kboard, + safe_call1 (Qvendor_specific_keysyms, + (vendor + ? build_string (vendor) + : empty_unibyte_string))); block_input (); terminal->next_terminal = terminal_list; terminal_list = terminal;