From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Emacs daemon doesn't terminate on SIGTERM any more Date: Sun, 24 Oct 2010 12:06:44 -0400 Message-ID: <87vd4r378r.fsf@stupidchicken.com> References: <19649.19677.433824.461239@a1i15.kph.uni-mainz.de> <19650.5497.137779.175728@a1i15.kph.uni-mainz.de> <4CC2A3DB.2090904@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1287936503 2957 80.91.229.12 (24 Oct 2010 16:08:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 24 Oct 2010 16:08:23 +0000 (UTC) Cc: Ulrich Mueller , emacs-devel@gnu.org To: Jan =?utf-8?Q?Dj=C3=A4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 24 18:08:22 2010 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.69) (envelope-from ) id 1PA37N-0001wX-0v for ged-emacs-devel@m.gmane.org; Sun, 24 Oct 2010 18:08:22 +0200 Original-Received: from localhost ([127.0.0.1]:35651 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PA37K-0003sw-Pq for ged-emacs-devel@m.gmane.org; Sun, 24 Oct 2010 12:08:18 -0400 Original-Received: from [140.186.70.92] (port=44543 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PA37A-0001ZJ-3m for emacs-devel@gnu.org; Sun, 24 Oct 2010 12:08:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PA35w-0003Yc-Pa for emacs-devel@gnu.org; Sun, 24 Oct 2010 12:06:59 -0400 Original-Received: from pantheon-po43.its.yale.edu ([130.132.50.104]:35446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PA35w-0003YD-LP for emacs-devel@gnu.org; Sun, 24 Oct 2010 12:06:52 -0400 Original-Received: from furball (173-9-75-145-NewEngland.hfc.comcastbusiness.net [173.9.75.145]) (authenticated bits=0) by pantheon-po43.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o9OG6iMc029829 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 24 Oct 2010 12:06:44 -0400 Original-Received: by furball (Postfix, from userid 1000) id DB4191607BF; Sun, 24 Oct 2010 12:06:44 -0400 (EDT) In-Reply-To: <4CC2A3DB.2090904@swipnet.se> ("Jan =?utf-8?Q?Dj=C3=A4rv=22's?= message of "Sat, 23 Oct 2010 10:59:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 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:132050 Archived-At: Jan Dj=C3=A4rv writes: > This was done so that kill-emacs-hook is run. For example, desktop.el > will then save its desktop when logging out from Gnome/KDE. > > What Emacs needs is some sort of notion of when user interaction is > not OK. For SIGTERM it is almost never ok, as it might be the window > manager/system/whatever that is shutting down. Even desktop.el will > try to ask questions sometimes (i.e. desktop-save is set but there is > no desktop file yet), which is annoying. Maybe introduce some > interaction-ok-p predicate? How about it, in response to a kill signal, we do noninteractive =3D 1; before calling Fkill_emacs?