Make timer_check even more resilient
* src/keyboard.c (timer_check): Inhibit atimers while making the copy of the timer list (bug#21380). This prevents an extremely unlikely segfault.
This commit is contained in:
parent
1b71c995da
commit
fa52782f5c
1 changed files with 4 additions and 0 deletions
|
@ -4633,6 +4633,8 @@ timer_check (void)
|
|||
|
||||
Lisp_Object tem = Vinhibit_quit;
|
||||
Vinhibit_quit = Qt;
|
||||
block_input ();
|
||||
turn_on_atimers (false);
|
||||
|
||||
/* We use copies of the timers' lists to allow a timer to add itself
|
||||
again, without locking up Emacs if the newly added timer is
|
||||
|
@ -4646,6 +4648,8 @@ timer_check (void)
|
|||
else
|
||||
idle_timers = Qnil;
|
||||
|
||||
turn_on_atimers (true);
|
||||
unblock_input ();
|
||||
Vinhibit_quit = tem;
|
||||
|
||||
do
|
||||
|
|
Loading…
Add table
Reference in a new issue