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: Running atimers when exiting due to a fatal signal Date: Mon, 01 Oct 2012 12:12:16 +0200 Message-ID: <83bogmcxhb.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1349086532 24453 80.91.229.3 (1 Oct 2012 10:15:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Oct 2012 10:15:32 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 01 12:15:34 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TIczS-0006gB-6O for ged-emacs-devel@m.gmane.org; Mon, 01 Oct 2012 12:12:42 +0200 Original-Received: from localhost ([::1]:41143 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIczM-0005yp-K5 for ged-emacs-devel@m.gmane.org; Mon, 01 Oct 2012 06:12:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIczF-0005yj-8k for emacs-devel@gnu.org; Mon, 01 Oct 2012 06:12:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIcz9-000889-Bm for emacs-devel@gnu.org; Mon, 01 Oct 2012 06:12:29 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:51214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIcz9-00087q-4g for emacs-devel@gnu.org; Mon, 01 Oct 2012 06:12:23 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MB700300LMK7J00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Mon, 01 Oct 2012 12:12:10 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MB7003YOLO94630@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Mon, 01 Oct 2012 12:12:10 +0200 (IST) X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153812 Archived-At: When we catch a fatal signal, we do this: terminate_due_to_signal (int sig, int backtrace_limit) { signal (sig, SIG_DFL); totally_unblock_input (); And totally_unblock_input has a side effect of calling do_pending_atimers. What is the purpose of running atimers when we caught a fatal signal? That could result in a nested signal, if some atimer runs a non-trivial function, couldn't it? If the result is the same signal as the one we caught, we will then crash without having a chance to auto-save in shut_down_emacs. If that's a different signal, we get nested signal handling which complicates debugging, if nothing else. So running atimers at that time sounds like a bad idea, IMO.