mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-27 19:31:38 +00:00
Avoid endless loop when handling fatal signal.
* src/emacs.c (terminate_due_to_signal): Move totally_unblock_input after setting fatal_error_in_progress, so gobble_input and *read_socket are not read if there are pending_signals.
This commit is contained in:
parent
98cb7d9e4d
commit
51d475a8d8
@ -1,3 +1,9 @@
|
||||
2015-02-20 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* emacs.c (terminate_due_to_signal): Move totally_unblock_input after
|
||||
setting fatal_error_in_progress, so gobble_input and *read_socket are
|
||||
not read if there are pending_signals.
|
||||
|
||||
2015-02-20 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Simplify binary I/O configuration
|
||||
|
@ -345,13 +345,13 @@ _Noreturn void
|
||||
terminate_due_to_signal (int sig, int backtrace_limit)
|
||||
{
|
||||
signal (sig, SIG_DFL);
|
||||
totally_unblock_input ();
|
||||
|
||||
/* If fatal error occurs in code below, avoid infinite recursion. */
|
||||
if (! fatal_error_in_progress)
|
||||
{
|
||||
fatal_error_in_progress = 1;
|
||||
|
||||
totally_unblock_input ();
|
||||
if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT)
|
||||
Fkill_emacs (make_number (sig));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user