From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: Emacs making questions while starting in daemon mode Date: Tue, 06 Jul 2010 14:28:28 -0400 Message-ID: References: <87wrt9j3mj.fsf@telefonica.net> <87bpali8vk.fsf@telefonica.net> <8739vxi6qg.fsf@telefonica.net> <87y6dohdq1.fsf@telefonica.net> <87ocekhafx.fsf@telefonica.net> <87630sa6w9.fsf@uwakimon.sk.tsukuba.ac.jp> <4C337242.6070405@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1278440924 21517 80.91.229.12 (6 Jul 2010 18:28:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Jul 2010 18:28:44 +0000 (UTC) Cc: =?iso-8859-1?Q?=D3scar?= Fuentes , "Stephen J. Turnbull" , Chad Brown , emacs-devel@gnu.org To: Jan =?iso-8859-1?Q?Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 06 20:28:40 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 1OWCsn-0005sw-Lb for ged-emacs-devel@m.gmane.org; Tue, 06 Jul 2010 20:28:37 +0200 Original-Received: from localhost ([127.0.0.1]:38146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWCsm-0007wP-TF for ged-emacs-devel@m.gmane.org; Tue, 06 Jul 2010 14:28:36 -0400 Original-Received: from [199.232.76.173] (port=43874 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWCsi-0007vf-1J for emacs-devel@gnu.org; Tue, 06 Jul 2010 14:28:32 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1OWCsg-0008D8-V4 for emacs-devel@gnu.org; Tue, 06 Jul 2010 14:28:31 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:51910) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1OWCsg-0008D4-Ko for emacs-devel@gnu.org; Tue, 06 Jul 2010 14:28:30 -0400 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1OWCse-00017V-76; Tue, 06 Jul 2010 14:28:28 -0400 In-Reply-To: <4C337242.6070405@swipnet.se> ("Jan =?iso-8859-1?Q?Dj=E4rv=22?= =?iso-8859-1?Q?'s?= message of "Tue\, 06 Jul 2010 20\:13\:22 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:126847 Archived-At: Jan Dj=E4rv writes: > Dan Nicolaescu skrev 2010-07-06 19.29: >> >> That happens already: >> >> $ cat .emacs >> (yes-or-no-p "Question?") >> $ emacs --daemon< /dev/null >> emacs --daemon< /dev/null >> ("emacs") >> Question?(yes or no) Warning (initialization): An error occurred while l= oading `/home/dann/.emacs': >> >> error: Error reading from stdin >> >> To ensure normal operation, you should investigate and remove the >> cause of the error in your initialization file. Start Emacs with >> the `--debug-init' option to view a complete error backtrace. >> Starting Emacs daemon. >> >> I suspect that the tool he uses to start emacs provides some bogus >> stdin and emacs dutifully waits for input from there. > > So emacs --daemon should behave more like a "proper" daemon, > i.e. close stdin/out/err and setsid and the whole works? It does that, but only after processing .emacs. The original implementation was closing all descriptors from the start, it was changed to the current one after some discussion on the list.