From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?SmFuIERqw6Rydg==?= Newsgroups: gmane.emacs.devel Subject: Re: Emacs daemon doesn't terminate on SIGTERM any more Date: Mon, 25 Oct 2010 07:42:46 +0200 Message-ID: <4CC518D6.2030409@swipnet.se> References: <19649.19677.433824.461239@a1i15.kph.uni-mainz.de> <19650.5497.137779.175728@a1i15.kph.uni-mainz.de> <4CC2A3DB.2090904@swipnet.se> <87vd4r378r.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1287985384 14969 80.91.229.12 (25 Oct 2010 05:43:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Oct 2010 05:43:04 +0000 (UTC) Cc: Ulrich Mueller , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 25 07:43:03 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 1PAFpm-0005Cq-NN for ged-emacs-devel@m.gmane.org; Mon, 25 Oct 2010 07:43:03 +0200 Original-Received: from localhost ([127.0.0.1]:37875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAFpm-0007FA-5m for ged-emacs-devel@m.gmane.org; Mon, 25 Oct 2010 01:43:02 -0400 Original-Received: from [140.186.70.92] (port=43709 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAFpb-0007Ec-8e for emacs-devel@gnu.org; Mon, 25 Oct 2010 01:42:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PAFpa-0001yi-0H for emacs-devel@gnu.org; Mon, 25 Oct 2010 01:42:51 -0400 Original-Received: from smtprelay-h31.telenor.se ([213.150.131.4]:41991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PAFpZ-0001yN-Oq for emacs-devel@gnu.org; Mon, 25 Oct 2010 01:42:49 -0400 Original-Received: from ipb1.telenor.se (ipb1.telenor.se [195.54.127.164]) by smtprelay-h31.telenor.se (Postfix) with ESMTP id 25E83E8BC3 for ; Mon, 25 Oct 2010 07:42:48 +0200 (CEST) X-SENDER-IP: [85.225.45.100] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ajc4AJO1xExV4S1kPGdsb2JhbACDHoRSmWsMAQEBATUtqVORG4EigzJ0BI1T X-IronPort-AV: E=Sophos;i="4.58,234,1286143200"; d="scan'208";a="144397506" Original-Received: from c-642de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.100]) by ipb1.telenor.se with ESMTP; 25 Oct 2010 07:42:47 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 3E62E7FA05A; Mon, 25 Oct 2010 07:42:47 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.11) Gecko/20101004 Thunderbird/3.1.5 In-Reply-To: <87vd4r378r.fsf@stupidchicken.com> X-detected-operating-system: by eggs.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:132078 Archived-At: Chong Yidong skrev 2010-10-24 18.06: > 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? That would be fine as long as code has something to look for. We would h= ave=20 to go through those that out themselves into kill-emacs-hook and modify t= hem,=20 perhaps starting with server.el and desktop.el first. Jan D.