[Top][All Lists]

[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: Mon, 02 Feb 2009 22:23:24 +0200

> From: Stefan Monnier <address@hidden>
> Date: Sat, 24 Jan 2009 15:32:43 -0500
> Cc: address@hidden, address@hidden
> > 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.

> so data structures should be just as stable as when we receive

I wasn't comparing with SIGUSRn when I wrote the above.

> > 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.

reply via email to

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