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: Lennart Borgman
Subject: Re: Functions in kill-emacs-hook aren't run if emacs gets killed with SIGTERM
Date: Sat, 24 Jan 2009 00:13:13 +0100

On Sat, Jan 24, 2009 at 12:00 AM, Tassilo Horn <address@hidden> wrote:
> Eli Zaretskii <address@hidden> writes:
>
>>> Uh, but SIGTERM IS "please shutdown". Sorry, but _conventionally_
>>> automated systems* will issue a SIGTERM to allow graceful shutdown
>>
>> And Emacs obeys this.  The argument is not whether Emacs obeys
>> SIGTERM, the argument is whether user-defined hooks should run when we
>> are hit with SIGTERM.
>
> I don't get what could be so dangerous running a user-defined hook after
> all buffers have been saved, as Stefan suggested.  The worst case I can
> imagine is that one of the functions accesses a file but is too slow,
> and a subsequent SIGKILL causes some data loss.
>
> But with the current way *every* SIGTERM causes data loss for me.

I did not follow this closely, but maybe this is hitting a problem in GNU/Linux?

I compare with w32 where the shutdown process waits if some program
has problem exiting.

Regarding Stefans suggestion the only useful thing to do is AFAICS to
save some things to a file, so yes, there might be a problem - but
probably not worse than doing nothing.




reply via email to

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