unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Alex Bennée" <kernel-hacker@bennee.com>
Cc: schwab@suse.de, 16599@debbugs.gnu.org
Subject: bug#16599: src/temacs --daemon fails
Date: Mon, 17 Feb 2014 18:38:29 +0200	[thread overview]
Message-ID: <83lhx98zju.fsf@gnu.org> (raw)
In-Reply-To: <83mwhp90ld.fsf@gnu.org>

> Date: Mon, 17 Feb 2014 18:15:58 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 16599@debbugs.gnu.org, kernel-hacker@bennee.com
> 
> > From: Andreas Schwab <schwab@suse.de>
> > Cc: Alex Bennée <kernel-hacker@bennee.com>,
> >   16599@debbugs.gnu.org
> > Date: Mon, 17 Feb 2014 17:03:01 +0100
> > 
> > Eli Zaretskii <eliz@gnu.org> writes:
> > 
> > >> From: Alex Bennée <kernel-hacker@bennee.com>
> > >> Cc: Alex Bennée <kernel-hacker@bennee.com>, Eli Zaretskii
> > >>  <eliz@gnu.org>, 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;
 }






      reply	other threads:[~2014-02-17 16:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87bnyt5zmi.fsf@linaro.org>
     [not found] ` <83k3dh7837.fsf@gnu.org>
2014-02-16 21:34   ` bug#16599: src/temacs --daemon fails Alex Bennée
2014-02-16 21:57     ` Andreas Schwab
     [not found]     ` <871tz2iuuu.fsf@igel.home>
2014-02-17  7:40       ` Alex Bennée
     [not found]       ` <877g8unq4s.fsf@bennee.com>
2014-02-17 15:51         ` Eli Zaretskii
2014-02-17 16:03           ` Andreas Schwab
2014-02-17 16:15             ` Eli Zaretskii
2014-02-17 16:38               ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83lhx98zju.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=16599@debbugs.gnu.org \
    --cc=kernel-hacker@bennee.com \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).