From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16599: src/temacs --daemon fails Date: Mon, 17 Feb 2014 18:38:29 +0200 Message-ID: <83lhx98zju.fsf@gnu.org> References: <87bnyt5zmi.fsf@linaro.org> <83k3dh7837.fsf@gnu.org> <878utaoi66.fsf__22889.092230662$1392587661$gmane$org@bennee.com> <871tz2iuuu.fsf@igel.home> <877g8unq4s.fsf@bennee.com> <83vbwd91pp.fsf@gnu.org> <83mwhp90ld.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1392655151 1255 80.91.229.3 (17 Feb 2014 16:39:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Feb 2014 16:39:11 +0000 (UTC) Cc: schwab@suse.de, 16599@debbugs.gnu.org To: Alex =?UTF-8?Q?Benn=C3=A9e?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 17 17:39:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WFRDu-0006eG-6l for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Feb 2014 17:39:14 +0100 Original-Received: from localhost ([::1]:42567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFRDt-0003BI-QW for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Feb 2014 11:39:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFRDm-0003BD-V2 for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2014 11:39:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFRDi-0002tG-72 for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2014 11:39:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFRDi-0002tB-3c for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2014 11:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WFRDh-0002OG-MQ for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2014 11:39:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Feb 2014 16:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16599-submit@debbugs.gnu.org id=B16599.13926551139151 (code B ref 16599); Mon, 17 Feb 2014 16:39:01 +0000 Original-Received: (at 16599) by debbugs.gnu.org; 17 Feb 2014 16:38:33 +0000 Original-Received: from localhost ([127.0.0.1]:56810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFRDE-0002NW-Sp for submit@debbugs.gnu.org; Mon, 17 Feb 2014 11:38:33 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:41519) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFRDB-0002NG-ST for 16599@debbugs.gnu.org; Mon, 17 Feb 2014 11:38:30 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N1500000FE0LY00@a-mtaout20.012.net.il> for 16599@debbugs.gnu.org; Mon, 17 Feb 2014 18:38:23 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N15000GLFJZER60@a-mtaout20.012.net.il>; Mon, 17 Feb 2014 18:38:23 +0200 (IST) In-reply-to: <83mwhp90ld.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:85758 Archived-At: > Date: Mon, 17 Feb 2014 18:15:58 +0200 > From: Eli Zaretskii > Cc: 16599@debbugs.gnu.org, kernel-hacker@bennee.com > > > From: Andreas Schwab > > Cc: Alex Bennée , > > 16599@debbugs.gnu.org > > Date: Mon, 17 Feb 2014 17:03:01 +0100 > > > > Eli Zaretskii writes: > > > > >> From: Alex Bennée > > >> Cc: Alex Bennée , Eli Zaretskii > > >> , 16599@debbugs.gnu.org, emacs-devel@gnu.org > > >> Date: Mon, 17 Feb 2014 07:40:35 +0000 > > >> > > >> Why did the syms_of_emacs() function feel the need to initialise daemon_pipe? > > > > > > Because in a dumped Emacs, daemon_pipe might hold a stale value from > > > before the dumping. > > > > But syms_of_emacs is not called in a dumped Emacs. > > So I guess we should move that line somewhere where it will be called. Like in the patch below. Alex, please try this one instead of the one I sent before. === modified file 'src/emacs.c' --- src/emacs.c 2014-01-20 19:44:56 +0000 +++ src/emacs.c 2014-02-17 16:36:32 +0000 @@ -721,6 +721,9 @@ main (int argc, char **argv) /* If we use --chdir, this records the original directory. */ char *original_pwd = 0; + /* Make sure IS_DAEMON starts up as false. */ + daemon_pipe[1] = 0; + #if GC_MARK_STACK stack_base = &dummy; #endif @@ -2548,7 +2551,4 @@ libraries; only those already known by E Vlibrary_cache = Qnil; staticpro (&Vlibrary_cache); #endif - - /* Make sure IS_DAEMON starts up as false. */ - daemon_pipe[1] = 0; }