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.bugs Subject: bug#16599: src/temacs --daemon fails Date: Sun, 16 Feb 2014 21:34:57 +0000 Message-ID: <878utaoi66.fsf__22889.092230662$1392587661$gmane$org@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 1392587648 6392 80.91.229.3 (16 Feb 2014 21:54:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Feb 2014 21:54:08 +0000 (UTC) Cc: 16599@debbugs.gnu.org, Alex =?UTF-8?Q?Benn=C3=A9e?= , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 16 22:54:13 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1WF9fB-0008BT-3f for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Feb 2014 22:54:13 +0100 Original-Received: from localhost ([::1]:35215 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WF9fA-000701-QW for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Feb 2014 16:54:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WF9f4-0006zw-Fd for bug-gnu-emacs@gnu.org; Sun, 16 Feb 2014 16:54:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WF9f0-0001Gq-8F for bug-gnu-emacs@gnu.org; Sun, 16 Feb 2014 16:54:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WF9f0-0001Gk-53 for bug-gnu-emacs@gnu.org; Sun, 16 Feb 2014 16:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WF9ez-0000zg-N9 for bug-gnu-emacs@gnu.org; Sun, 16 Feb 2014 16:54:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alex =?UTF-8?Q?Benn=C3=A9e?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Feb 2014 21:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16599-submit@debbugs.gnu.org id=B16599.13925876293796 (code B ref 16599); Sun, 16 Feb 2014 21:54:01 +0000 Original-Received: (at 16599) by debbugs.gnu.org; 16 Feb 2014 21:53:49 +0000 Original-Received: from localhost ([127.0.0.1]:55082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WF9em-0000z9-UL for submit@debbugs.gnu.org; Sun, 16 Feb 2014 16:53:49 -0500 Original-Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:53616 helo=socrates.bennee.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WF9Mo-0000Th-Lz for 16599@debbugs.gnu.org; Sun, 16 Feb 2014 16:35:15 -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-Mailman-Approved-At: Sun, 16 Feb 2014 16:53:47 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:85692 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 --=-=-=--