diff options
author | Eli Zaretskii <eliz@gnu.org> | 2016-12-19 19:11:16 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2016-12-19 19:11:16 +0200 |
commit | fe3188b1cecc7ac5534616c8edf14a84b1b3bbb0 (patch) | |
tree | 39041b114c679f98255e9c95f2b4666d6f269ab2 /lisp/emacs-lisp/cl-seq.el | |
parent | 657bcaf5ac30449915e070c3fa80a2eaaf1ee7e1 (diff) | |
download | emacs-fe3188b1cecc7ac5534616c8edf14a84b1b3bbb0.tar.gz emacs-fe3188b1cecc7ac5534616c8edf14a84b1b3bbb0.tar.bz2 emacs-fe3188b1cecc7ac5534616c8edf14a84b1b3bbb0.zip |
Fix crashes upon C-g on Posix TTY frames
* src/thread.h (struct thread_state): New member not_holding_lock.
(maybe_reacquire_global_lock): Add prototype.
* src/thread.c: Include syssignal.h.
(maybe_reacquire_global_lock): New function.
(really_call_select): Set the not_holding_lock member of the
thread state before releasing the lock, and rest it after
re-acquiring the lock when the select function returns. Block
SIGINT while doing this to make sure we are not interrupted on TTY
frames.
* src/sysdep.c (block_interrupt_signal, restore_signal_mask): New
functions.
* src/syssignal.h (block_interrupt_signal, restore_signal_mask):
Add prototypes.
* src/keyboard.c (read_char) [THREADS_ENABLED]: Call
maybe_reacquire_global_lock. (Bug#25178)
Diffstat (limited to 'lisp/emacs-lisp/cl-seq.el')
0 files changed, 0 insertions, 0 deletions