From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: y-or-n-p and emacs --daemon Date: Thu, 04 Dec 2008 08:15:11 -0500 Message-ID: References: <18742.25383.80136.946560@a1i15.kph.uni-mainz.de> <87ocztcy3t.fsf@grumblesmurf.org> <87abbdm4t8.fsf@cyd.mit.edu> <200812031953.mB3Jr4qh027604@mothra.ics.uci.edu> <874p1lj7bp.fsf@cyd.mit.edu> <18743.48104.822687.186192@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 1228396684 988 80.91.229.12 (4 Dec 2008 13:18:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Dec 2008 13:18:04 +0000 (UTC) Cc: Chong Yidong , Dan Nicolaescu , emacs-devel@gnu.org, Espen Wiborg To: Ulrich Mueller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 04 14:19:08 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 1L8E6c-00009C-FC for ged-emacs-devel@m.gmane.org; Thu, 04 Dec 2008 14:18:58 +0100 Original-Received: from localhost ([127.0.0.1]:47818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8E5R-0005PP-K3 for ged-emacs-devel@m.gmane.org; Thu, 04 Dec 2008 08:17:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L8E32-0004EG-Fy for emacs-devel@gnu.org; Thu, 04 Dec 2008 08:15:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L8E30-0004DD-8e for emacs-devel@gnu.org; Thu, 04 Dec 2008 08:15:15 -0500 Original-Received: from [199.232.76.173] (port=41882 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8E2z-0004Cj-Qw for emacs-devel@gnu.org; Thu, 04 Dec 2008 08:15:13 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:43846 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L8E2z-0002Lq-50 for emacs-devel@gnu.org; Thu, 04 Dec 2008 08:15:13 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtcEABtnN0nO+Jkl/2dsb2JhbACBbc46gwKBIw X-IronPort-AV: E=Sophos;i="4.33,715,1220241600"; d="scan'208";a="30638342" Original-Received: from 206-248-153-37.dsl.teksavvy.com (HELO pastel.home) ([206.248.153.37]) by ironport2-out.teksavvy.com with ESMTP; 04 Dec 2008 08:15:12 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id D6E8884A9; Thu, 4 Dec 2008 08:15:11 -0500 (EST) In-Reply-To: <18743.48104.822687.186192@a1i15.kph.uni-mainz.de> (Ulrich Mueller's message of "Thu, 4 Dec 2008 12:15:52 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.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:106559 Archived-At: >> Ideally, either the question comes before detaching and it should then >> behave as it does in -batch, > I think that this is unaccaptable. A daemon shouldn't be interactive > before detaching. Besides, there might not be any terminal associated > with stdin, so this doesn't solve the problem for this case. My comment was not intended to imply that this will solve all problems. But it will at least make the code work as close to its intended behavior as possible. Now it will indeed be the case that the daemon will often be started non-interactively, in which case any form of interactivity is undesirable. This is a separate problem. I'm not sure how best to solve it, tho if we can detect that stdin=/dev/null (i.e. when we reach EOF on stdin) we might want to signal an error, like you propose. Stefan