[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Functions in kill-emacs-hook aren't run if emacs gets killed with SI
Re: Functions in kill-emacs-hook aren't run if emacs gets killed with SIGTERM
Wed, 04 Feb 2009 22:34:38 -0500
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
>> > We may also delay it indefinitely if we run Lisp, because that could
>> > infloop, especially if our internal data structures are unstable.
>> What makes you think our data structures might be unstable when we
>> get SIGTERM?
> Because of what you yourself wrote:
>> AFAIK this signal is only received when some external process
>> decides that Emacs should stop
> An external process can decide that Emacs should stop whenever it
> wants to, and Emacs could be in the middle of GC, for example.
But as I said repeatedly in this thread it's irrelevant, because in
order for it to run kill-emacs-hook, this signal should not be handed
from its signal handler but from the usual input handling, just
like SIGUSRn. So data-structures should be just fine.
>> > If SIGTERM is used to programmatically shut down Emacs, I think it's
>> > rather a conceptual bug in whatever uses SIGTERM for that purpose.
>> Huh? SIGTERM is *the canonical way* to programmatically shut down an
>> application via a signal.
>> From _outside_ Emacs, yes. Which isn't the case here.
> Anyway, Dan suggested a better way long ago, so it's IMO pointless to
> continue this argument.
No, it's an alternative solution to "how do I kill the daemon".
I still think that sending the SIGTERM signal should run