From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Espen Wiborg Newsgroups: gmane.emacs.devel Subject: Re: y-or-n-p and emacs --daemon Date: Wed, 03 Dec 2008 12:11:18 +0100 Message-ID: <87ocztcy3t.fsf@grumblesmurf.org> References: <18742.25383.80136.946560@a1i15.kph.uni-mainz.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1228326900 20834 80.91.229.12 (3 Dec 2008 17:55:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Dec 2008 17:55:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 03 18:56:03 2008 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 1L7vwP-0003xu-Jn for ged-emacs-devel@m.gmane.org; Wed, 03 Dec 2008 18:55:14 +0100 Original-Received: from localhost ([127.0.0.1]:35300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7vvF-0008BQ-3G for ged-emacs-devel@m.gmane.org; Wed, 03 Dec 2008 12:54:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7pdq-0004WX-Hb for emacs-devel@gnu.org; Wed, 03 Dec 2008 06:11:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7pdm-0004Vs-QC for emacs-devel@gnu.org; Wed, 03 Dec 2008 06:11:36 -0500 Original-Received: from [199.232.76.173] (port=44640 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7pdm-0004Vp-G3 for emacs-devel@gnu.org; Wed, 03 Dec 2008 06:11:34 -0500 Original-Received: from friends.chrissearle.org ([78.47.168.123]:35765 helo=bryanek.chrissearle.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L7pdm-0002Lc-5j for emacs-devel@gnu.org; Wed, 03 Dec 2008 06:11:34 -0500 Original-Received: from [82.196.214.14] (helo=espenw-laptop.telio.no) by bryanek.chrissearle.org with esmtpsa (TLS-1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.63) (envelope-from ) id 1L7pde-0006dv-O7 for emacs-devel@gnu.org; Wed, 03 Dec 2008 12:11:29 +0100 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:1NQ8U8V2S7yB+nZvC2Xxc07fFas= In-Reply-To: <18742.25383.80136.946560@a1i15.kph.uni-mainz.de> (Ulrich Mueller's message of "Wed, 3 Dec 2008 11:44:55 +0100") X-SA-Exim-Connect-IP: 82.196.214.14 X-SA-Exim-Mail-From: espenhw@grumblesmurf.org X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000) X-SA-Exim-Scanned: Yes (on bryanek.chrissearle.org) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Wed, 03 Dec 2008 12:53:18 -0500 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:106523 Archived-At: Ulrich Mueller writes: > Considering bugs like #1474, I wonder if y-or-n-p DTRT? > > Try the following: > > $ emacs-23 -Q --daemon --eval '(y-or-n-p "hello? ")' > > 1. It hangs indefinitely, > 2. it does not detach properly (it forks, but the parent doesn't exit), > 3. it doesn't start the server. > > Of course 2. and 3. are a consequence of 1. since it doesn't come to > the point where daemon-initialized gets called. > > Now the problem is that y-or-n-p is called from many places, so > depending on the configuration there is some chance that Emacs will > ask for user interaction before initialisation is finished. There is > even one in server-start (which AFAICS won't be triggered in daemon > mode, but still...). Actually, this yes-or-no-p *is* triggered in daemon mode, but only (AFAICT) in the case uncovered by bug #1310, where a client's X connection is lost and the daemon tries to shut down. -- Espen Wiborg - Veritas vos liberabit 'Pooh?' he said. 'Yes, Piglet?' Pooh replied. 'Nothing,' Piglet said, taking Pooh's paw, 'I just wanted to throw an exception.'