emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 109da68: Avoid kill-emacs-hook errors hanging batch


From: Glenn Morris
Subject: [Emacs-diffs] master 109da68: Avoid kill-emacs-hook errors hanging batch mode
Date: Tue, 23 Jan 2018 20:57:21 -0500 (EST)

branch: master
commit 109da684c5124e22505917fe0255ca66f2a6bfc9
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Avoid kill-emacs-hook errors hanging batch mode
    
    * src/emacs.c (Fkill_emacs): Prevent errors from kill-emacs-hook
    hanging Emacs in batch mode.  (Bug#29955)
---
 src/emacs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/emacs.c b/src/emacs.c
index 84cd3ac..8ea61b7 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2024,7 +2024,10 @@ all of which are called before Emacs is actually killed. 
 */
   /* Fsignal calls emacs_abort () if it sees that waiting_for_input is
      set.  */
   waiting_for_input = 0;
-  run_hook (Qkill_emacs_hook);
+  if (noninteractive)
+    safe_run_hooks (Qkill_emacs_hook);
+  else
+    run_hook (Qkill_emacs_hook);
 
 #ifdef HAVE_X_WINDOWS
   /* Transfer any clipboards we own to the clipboard manager.  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]