From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel 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 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1233606217 4324 80.91.229.12 (2 Feb 2009 20:23:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2009 20:23:37 +0000 (UTC) Cc: tassilo@member.fsf.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 02 21:24:51 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LU5Lc-0001gE-A3 for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2009 21:24:48 +0100 Original-Received: from localhost ([127.0.0.1]:42492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU5KJ-0005eJ-DJ for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2009 15:23:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LU5KF-0005eE-KE for emacs-devel@gnu.org; Mon, 02 Feb 2009 15:23:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LU5KE-0005e1-Ao for emacs-devel@gnu.org; Mon, 02 Feb 2009 15:23:23 -0500 Original-Received: from [199.232.76.173] (port=38817 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU5KE-0005dy-6M for emacs-devel@gnu.org; Mon, 02 Feb 2009 15:23:22 -0500 Original-Received: from mtaout2.012.net.il ([84.95.2.4]:11555) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LU5KD-0001hN-RZ for emacs-devel@gnu.org; Mon, 02 Feb 2009 15:23:22 -0500 Original-Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KEG00500GEZD900@i_mtaout2.012.net.il> for emacs-devel@gnu.org; Mon, 02 Feb 2009 22:23:42 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.228.158.130]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KEG008FDGNGIS81@i_mtaout2.012.net.il>; Mon, 02 Feb 2009 22:23:42 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:108632 Archived-At: > From: Stefan Monnier > Date: Sat, 24 Jan 2009 15:32:43 -0500 > Cc: tassilo@member.fsf.org, emacs-devel@gnu.org > > > 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 > SIGUSRn. 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.