diff options
author | K. Handa <handa@gnu.org> | 2016-01-08 23:21:43 +0900 |
---|---|---|
committer | K. Handa <handa@gnu.org> | 2016-01-08 23:21:43 +0900 |
commit | f36805424633e3acb48ed9f0f729a36760e4cb7f (patch) | |
tree | 555f0e21f19aeee47d2855a5c7700afec5c81386 /src/emacs.c | |
parent | bc9a28ab424647209cc2f91ad21cdb41a7052812 (diff) | |
parent | 4580671f5e2a68885e0fca93eeaf9daaeebe82b3 (diff) | |
download | emacs-f36805424633e3acb48ed9f0f729a36760e4cb7f.tar.gz emacs-f36805424633e3acb48ed9f0f729a36760e4cb7f.tar.bz2 emacs-f36805424633e3acb48ed9f0f729a36760e4cb7f.zip |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'src/emacs.c')
-rw-r--r-- | src/emacs.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/emacs.c b/src/emacs.c index 926aa989e6a..d13413d880b 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -370,17 +370,20 @@ terminate_due_to_signal (int sig, int backtrace_limit) { signal (sig, SIG_DFL); - /* If fatal error occurs in code below, avoid infinite recursion. */ - if (! fatal_error_in_progress) + if (attempt_orderly_shutdown_on_fatal_signal) { - fatal_error_in_progress = 1; + /* 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)); + totally_unblock_input (); + if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT) + Fkill_emacs (make_number (sig)); - shut_down_emacs (sig, Qnil); - emacs_backtrace (backtrace_limit); + shut_down_emacs (sig, Qnil); + emacs_backtrace (backtrace_limit); + } } /* Signal the same code; this time it will really be fatal. |