From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alex =?utf-8?Q?Benn=C3=A9e?= Newsgroups: gmane.emacs.devel Subject: Re: src/temacs --daemon fails Date: Sun, 16 Feb 2014 21:34:57 +0000 Message-ID: <878utaoi66.fsf@bennee.com> References: <87bnyt5zmi.fsf@linaro.org> <83k3dh7837.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1392586525 27538 80.91.229.3 (16 Feb 2014 21:35:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Feb 2014 21:35:25 +0000 (UTC) Cc: 16599@debbugs.gnu.org, Alex =?utf-8?Q?Benn=C3=A9e?= , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 16 22:35:33 2014 Return-path: Envelope-to: ged-emacs-devel@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 1WF9N4-0004Vo-IE for ged-emacs-devel@m.gmane.org; Sun, 16 Feb 2014 22:35:30 +0100 Original-Received: from localhost ([::1]:35171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WF9N4-0004RK-6l for ged-emacs-devel@m.gmane.org; Sun, 16 Feb 2014 16:35:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WF9Mu-0004R7-ES for emacs-devel@gnu.org; Sun, 16 Feb 2014 16:35:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WF9Mq-0005Vj-3B for emacs-devel@gnu.org; Sun, 16 Feb 2014 16:35:20 -0500 Original-Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:56910 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WF9Mp-0005V7-Sj; Sun, 16 Feb 2014 16:35:16 -0500 Original-Received: from localhost ([127.0.0.1]) by socrates.bennee.com with esmtp (Exim 4.80) (envelope-from ) id 1WF9Pv-0004l8-Pc; Sun, 16 Feb 2014 22:38:28 +0100 User-agent: mu4e 0.9.9.6pre2; emacs 24.3.50 In-reply-to: <83k3dh7837.fsf@gnu.org> X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: kernel-hacker@bennee.com X-SA-Exim-Scanned: No (on socrates.bennee.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 88.198.71.155 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:169669 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Eli Zaretskii writes: >> From: Alex Bennée >> 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: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-src-emacs.c-ensure-daemon_pipe-initialised-before-us.patch Content-Description: Fix initialistion of daemon_pipes >From 3dee0d9da394e17b4e6cb97cb22399f027cab440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit > > Thanks. -- Alex Bennée --=-=-=--