GNU bug report logs - #29955
25.2; stale lock files can hang emacs --batch

Previous Next

Package: emacs;

Reported by: David Bremner <david <at> tethera.net>

Date: Wed, 3 Jan 2018 00:58:01 UTC

Severity: normal

Found in versions 25.2, 24.5

Fixed in versions 26.2, 27.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 29955-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 29955-done <at> debbugs.gnu.org
Subject: Re: bug#29955: 25.2; stale lock files can hang emacs --batch
Date: Tue, 23 Jan 2018 20:59:37 -0500
Version: 27.1

I applied the following to master (though emacs-26 seems appropriate to me).
Together with 28718c4, it should fix this issue.

commit 109da68
Date:   Tue Jan 23 20:55:09 2018 -0500

    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)

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.  */




This bug report was last modified 6 years and 195 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.