GNU bug report logs -
#16599
24.3.50; src/temacs --daemon fails to start
Previous Next
Reported by: Alex Bennée <alex.bennee <at> linaro.org>
Date: Thu, 30 Jan 2014 18:36:01 UTC
Severity: minor
Found in version 24.3.50
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 16599 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Alex Bennée <kernel-hacker <at> 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:
[0001-src-emacs.c-ensure-daemon_pipe-initialised-before-us.patch (text/x-diff, inline)]
From 3dee0d9da394e17b4e6cb97cb22399f027cab440 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex <at> 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
[Message part 3 (text/plain, inline)]
>
> Thanks.
--
Alex Bennée
This bug report was last modified 11 years and 101 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.