emacs-devel
[Top][All Lists]
Advanced

[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


From: Stefan Monnier
Subject: Re: Functions in kill-emacs-hook aren't run if emacs gets killed with SIGTERM
Date: Wed, 21 Jan 2009 15:36:12 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> No.  Fatal signals, such as SIGTERM, are caught by a signal handler,
> which runs emacs.c:shut_down_emacs.  `kill-emacs' in a nutshell runs
> `kill-emacs-hook' and then also calls shut_down_emacs.

It would probably make sense to run kill-emacs-hook when we receive
SIGTERM, although it does imply a significant change (basically
handling SIGTERM similarly to SIGUSRn).

>> A related question: What does emacs --daemon do when it receives a
>> SIGTERM and there are unsaved buffers?
> Sorry, I don't know.  Someone else will have to answer this.

I think it just does autosaves and then exits.


        Stefan




reply via email to

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