aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2013-10-07 22:13:21 -0700
committerPaul Eggert2013-10-07 22:13:21 -0700
commit18978362d27ab487cafbcba58fb74a2d24eaedc4 (patch)
treed645cad727cde4e7190bef0abdb7ec8d88543a17
parent3e45e7023ef4e43c4de36e517e47b0429e5d9929 (diff)
downloademacs-18978362d27ab487cafbcba58fb74a2d24eaedc4.tar.gz
emacs-18978362d27ab487cafbcba58fb74a2d24eaedc4.zip
Fix race where emacs aborts when sent SIGTERM.
* keyboard.c (unblock_input_to): Don't process pending signals if a fatal error is in progress. Fixes: debbugs:15534
-rw-r--r--src/ChangeLog4
-rw-r--r--src/keyboard.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 755e710c079..41771c92e93 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
12013-10-08 Paul Eggert <eggert@cs.ucla.edu> 12013-10-08 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Fix race where emacs aborts when sent SIGTERM (Bug#15534).
4 * keyboard.c (unblock_input_to): Don't process pending signals
5 if a fatal error is in progress.
6
3 * lisp.h (bits_word, BITS_WORD_MAX): New type and macro. 7 * lisp.h (bits_word, BITS_WORD_MAX): New type and macro.
4 All uses of 'size_t' and 'SIZE_MAX' changed to use them, when 8 All uses of 'size_t' and 'SIZE_MAX' changed to use them, when
5 they're talking about words in Lisp bool vectors. 9 they're talking about words in Lisp bool vectors.
diff --git a/src/keyboard.c b/src/keyboard.c
index 05efe7c1312..4bfe47f3332 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -7090,7 +7090,8 @@ process_pending_signals (void)
7090} 7090}
7091 7091
7092/* Undo any number of BLOCK_INPUT calls down to level LEVEL, 7092/* Undo any number of BLOCK_INPUT calls down to level LEVEL,
7093 and also (if the level is now 0) reinvoke any pending signal. */ 7093 and reinvoke any pending signal if the level is now 0 and
7094 a fatal error is not already in progress. */
7094 7095
7095void 7096void
7096unblock_input_to (int level) 7097unblock_input_to (int level)
@@ -7098,7 +7099,7 @@ unblock_input_to (int level)
7098 interrupt_input_blocked = level; 7099 interrupt_input_blocked = level;
7099 if (level == 0) 7100 if (level == 0)
7100 { 7101 {
7101 if (pending_signals) 7102 if (pending_signals && !fatal_error_in_progress)
7102 process_pending_signals (); 7103 process_pending_signals ();
7103 } 7104 }
7104 else if (level < 0) 7105 else if (level < 0)