all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Alex Bennée" <kernel-hacker@bennee.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16599@debbugs.gnu.org, "Alex Bennée" <kernel-hacker@bennee.com>,
	emacs-devel@gnu.org
Subject: Re: src/temacs --daemon fails
Date: Sun, 16 Feb 2014 21:34:57 +0000	[thread overview]
Message-ID: <878utaoi66.fsf@bennee.com> (raw)
In-Reply-To: <83k3dh7837.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]


Eli Zaretskii <eliz@gnu.org> writes:

>> From: Alex Bennée <kernel-hacker@bennee.com>
>> Date: Thu, 30 Jan 2014 14:10:45 +0000
>> 
>> In an unrelated issue I found that I can't start src/temacs with the
>> --daemon option which works with the dumped version src/emacs.
>
> Please use "M-x report-emacs-bug RET" to report such bugs, then they
> are automatically emailed to the bug tracker address.

I raised bug #16599 and I have tracked it down to being reset by
syms_of_emacs() which is called in temacs after being set up by
--daemon. I assume the dumped src/emacs behaves differently.

The following patch works for me:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Fix initialistion of daemon_pipes --]
[-- Type: text/x-diff, Size: 1039 bytes --]

From 3dee0d9da394e17b4e6cb97cb22399f027cab440 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex@bennee.com>
Date: Sun, 16 Feb 2014 20:59:06 +0000
Subject: [PATCH] src/emacs.c: ensure daemon_pipe initialised before use

Otherwise this breaks src/temacs --daemon invocations by resetting the
daemon_pipe FDs which are used to determine if Emacs is in daemon mode.
---
 src/emacs.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/emacs.c b/src/emacs.c
index 18f6a08..66f47ef 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -201,7 +201,7 @@ static char *daemon_name;
 
 /* Pipe used to send exit notification to the daemon parent at
    startup.  */
-int daemon_pipe[2];
+int daemon_pipe[2] = {0, 0};
 
 /* Save argv and argc.  */
 char **initial_argv;
@@ -2548,7 +2548,4 @@ libraries; only those already known by Emacs will be loaded.  */);
   Vlibrary_cache = Qnil;
   staticpro (&Vlibrary_cache);
 #endif
-
-  /* Make sure IS_DAEMON starts up as false.  */
-  daemon_pipe[1] = 0;
 }
-- 
1.8.5.3


[-- Attachment #3: Type: text/plain, Size: 33 bytes --]



>
> Thanks.

-- 
Alex Bennée


  reply	other threads:[~2014-02-16 21:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30 14:10 src/temacs --daemon fails Alex Bennée
2014-01-30 16:22 ` Eli Zaretskii
2014-02-16 21:34   ` Alex Bennée [this message]
2014-02-16 21:34   ` bug#16599: " Alex Bennée
2014-02-16 21:57     ` Andreas Schwab
2014-02-17  7:40       ` Alex Bennée
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
2014-02-17  7:40       ` Alex Bennée
2014-02-16 21:57     ` Andreas Schwab

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

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

  git send-email \
    --in-reply-to=878utaoi66.fsf@bennee.com \
    --to=kernel-hacker@bennee.com \
    --cc=16599@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.