From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Functions in kill-emacs-hook aren't run if emacs gets killed with SIGTERM Date: Wed, 21 Jan 2009 09:06:58 +0100 Message-ID: <87prihxeu5.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1232525239 23943 80.91.229.12 (21 Jan 2009 08:07:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Jan 2009 08:07:19 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 21 09:08:30 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 1LPY8T-0000qE-Uy for ged-emacs-devel@m.gmane.org; Wed, 21 Jan 2009 09:08:30 +0100 Original-Received: from localhost ([127.0.0.1]:55163 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPY7C-00018u-Ec for ged-emacs-devel@m.gmane.org; Wed, 21 Jan 2009 03:07:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPY76-00018p-OR for emacs-devel@gnu.org; Wed, 21 Jan 2009 03:07:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPY74-00018W-44 for emacs-devel@gnu.org; Wed, 21 Jan 2009 03:07:03 -0500 Original-Received: from [199.232.76.173] (port=49016 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPY74-00018P-0w for emacs-devel@gnu.org; Wed, 21 Jan 2009 03:07:02 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]:12707) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LPY73-0006Sw-D2 for emacs-devel@gnu.org; Wed, 21 Jan 2009 03:07:01 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPY72-0002Wl-Rw for emacs-devel@gnu.org; Wed, 21 Jan 2009 03:07:01 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 81BDE789AB22 for ; Wed, 21 Jan 2009 09:06:59 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03270-06 for ; Wed, 21 Jan 2009 09:06:58 +0100 (CET) X-CHKRCPT: Envelopesender vrfy tassilo@member.fsf.org Original-Received: from thinkpad.tsdh.de (dhcp41.uni-koblenz.de [141.26.71.41]) by deliver.uni-koblenz.de (Postfix) with ESMTP id C77D6789AB06 for ; Wed, 21 Jan 2009 09:06:58 +0100 (CET) Mail-Copies-To: never Mail-Followup-To: emacs-devel@gnu.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-detected-kernel: by mx20.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:108027 Archived-At: Hi, I use emacs --daemon as system service and it's started and stopped by the start-stop-daemon utility. Now I found out that all the functions in `kill-emacs-hook' aren't run when start-stop-daemon stops the emacs process. I'm not sure how it stops it, but I think it's by sending a SIGTERM to the process, waiting some seconds and then firing an SIGKILL if the process didn't finish. How does emacs handle SIGTERM? Doesn't it simply run `kill-emacs'? At least that's what I would expect. A related question: What does emacs --daemon do when it receives a SIGTERM and there are unsaved buffers? Bye, Tassilo