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: Eli Zaretskii
Subject: Re: Functions in kill-emacs-hook aren't run if emacs gets killed with SIGTERM
Date: Thu, 22 Jan 2009 06:09:39 +0200

> From: Stefan Monnier <address@hidden>
> Cc: Tassilo Horn <address@hidden>,  address@hidden
> Date: Wed, 21 Jan 2009 15:36:12 -0500
> 
> > 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).

SIGUSRn are different in that they are ``soft'', and are not generally
expected to interrupt code in dangerous state.  The fact that SIGTERM
in this case is a programmed means to stop Emacs does not mean it's
the only use case where SIGTERM is delivered to Emacs.  We shouldn't
IMO change code based just on this single use case.




reply via email to

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