From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Functions in kill-emacs-hook aren't run if emacs gets killed with SIGTERM Date: Thu, 05 Feb 2009 14:40:28 -0500 Message-ID: References: <49887EB8.1060400@gmx.de> <498AEA46.4050006@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1233863001 840 80.91.229.12 (5 Feb 2009 19:43:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Feb 2009 19:43:21 +0000 (UTC) Cc: tassilo@member.fsf.org, emacs-devel@gnu.org To: grischka Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 05 20:44:35 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 1LVA96-0004cU-75 for ged-emacs-devel@m.gmane.org; Thu, 05 Feb 2009 20:44:20 +0100 Original-Received: from localhost ([127.0.0.1]:49747 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LVA7n-0004QG-5Y for ged-emacs-devel@m.gmane.org; Thu, 05 Feb 2009 14:42:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LVA5O-0002jN-SI for emacs-devel@gnu.org; Thu, 05 Feb 2009 14:40:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LVA5O-0002jB-9t for emacs-devel@gnu.org; Thu, 05 Feb 2009 14:40:30 -0500 Original-Received: from [199.232.76.173] (port=47804 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LVA5N-0002j8-TX for emacs-devel@gnu.org; Thu, 05 Feb 2009 14:40:29 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:40853) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LVA5N-0008C0-L6 for emacs-devel@gnu.org; Thu, 05 Feb 2009 14:40:29 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsIEACLPiklFxIvi/2dsb2JhbACBbs5zhBYGgwI X-IronPort-AV: E=Sophos;i="4.37,386,1231131600"; d="scan'208";a="33391596" Original-Received: from 69-196-139-226.dsl.teksavvy.com (HELO pastel.home) ([69.196.139.226]) by ironport2-out.teksavvy.com with ESMTP; 05 Feb 2009 14:40:29 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 0329583D4; Thu, 5 Feb 2009 14:40:28 -0500 (EST) In-Reply-To: <498AEA46.4050006@gmx.de> (grischka's message of "Thu, 05 Feb 2009 14:31:50 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:108800 Archived-At: >> Yes, I think this is the right way to do it. The only change I'd like >> to do is to do the autosaves as before in the signal handler before >> passing on the signal through the normal input handling (i.e. before >> running kill-emacs-hook). > Well, in an ideal world the signal handler could just set the quit-flag > which would interrupt running lisp code and in consequence allow the > sigterm EVENT being handled reliably always, such that things like > autosave could be done from lisp as well. No, we want to do the autosave directly from the signal handler (like we do currently), because the Lisp world might be so completely messed up that even the quit-flag would never be noticed. Stefan