bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16599: src/temacs --daemon fails


From: Eli Zaretskii
Subject: bug#16599: src/temacs --daemon fails
Date: Mon, 17 Feb 2014 18:38:29 +0200

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]