Subject: Re: bug#29955: 25.2; stale lock files can hang emacs --batch

From: Glenn Morris <[email-masked]>
Date: Mon, 22 Jan 2018 18:50:02 -0500

Glenn Morris wrote:

> I note that this also hangs:
>
> emacs -Q --batch \
>    --eval "(add-hook 'kill-emacs-hook (lambda () (error \"foo\")))"

This can be avoided by using safe_run_hooks for Qkill_emacs_hook in
Fkill_emacs. Perhaps that's the right thing to do, if noninteractive?

Would it be correct for interactive mode, too?
As it stands, in interactive mode an error in kill-emacs-hook
will stop Emacs from exiting.
I'm not sure if that is a desirable feature or not...