From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#1107: #1107 - 23.0.60; Emacs --daemon crashes when emacsclient tries to establish a connection on OS X - Emacs bug report logs Date: Thu, 11 Dec 2008 11:21:34 -0500 Message-ID: References: Reply-To: Stefan Monnier , 1107@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1229014181 4625 80.91.229.12 (11 Dec 2008 16:49:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2008 16:49:41 +0000 (UTC) Cc: 1107@emacsbugs.donarmstrong.com To: Adrian Robert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 11 17:50:44 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LAojv-0003zw-3e for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Dec 2008 17:50:15 +0100 Original-Received: from localhost ([127.0.0.1]:45725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAoij-00042a-SU for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Dec 2008 11:49:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAoeI-0008W3-1z for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 11:44:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAoeH-0008VT-4p for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 11:44:25 -0500 Original-Received: from [199.232.76.173] (port=56155 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAoeG-0008VO-RK for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 11:44:24 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:43031) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LAoeG-0004nb-BW for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 11:44:24 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBBGiIMG024681; Thu, 11 Dec 2008 08:44:19 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mBBGU5e1019928; Thu, 11 Dec 2008 08:30:05 -0800 X-Loop: don@donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , don@donarmstrong.com Resent-Date: Thu, 11 Dec 2008 16:30:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1107 X-Emacs-PR-Package: emacs,ns X-Emacs-PR-Keywords: patch Original-Received: via spool by 1107-submit@emacsbugs.donarmstrong.com id=B1107.122901250417858 (code B ref 1107); Thu, 11 Dec 2008 16:30:05 +0000 X-Spam-Bayes: score:0.0000 Tokens: new, 17; hammy, 109; neutral, 43; spammy, 3. spammytokens:0.930-3--hopes, 0.907-+--chance, 0.862-+--here hammytokens:0.000-+--emacs, 0.000-+--23.0.60, 0.000-+--23060, 0.000-+--Emacs, 0.000-+--H*M:fsf Original-Received: (at 1107) by emacsbugs.donarmstrong.com; 11 Dec 2008 16:21:44 +0000 Original-Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBBGLeWn017841 for <1107@emacsbugs.donarmstrong.com>; Thu, 11 Dec 2008 08:21:42 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkcFAIzMQElFxIVh/2dsb2JhbACBbMtrgnmBLA X-IronPort-AV: E=Sophos;i="4.33,753,1220241600"; d="scan'208";a="30925963" Original-Received: from 69-196-133-97.dsl.teksavvy.com (HELO pastel.home) ([69.196.133.97]) by ironport2-out.teksavvy.com with ESMTP; 11 Dec 2008 11:21:34 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 99F5786F6; Thu, 11 Dec 2008 11:21:34 -0500 (EST) In-Reply-To: (Adrian Robert's message of "Tue, 9 Dec 2008 23:18:01 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Thu, 11 Dec 2008 11:44:25 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:23184 Archived-At: > I have not had the chance to refine my fix so I'm attaching my patch here in > hopes that someone else can work on it. It uses exec() instead of fork() > to launch the child, using a daemon name argument to differentiate the > child. This prevents normal use of the name argument. Moreover, the pipe > connection does not work (not sure why), so it is disabled. The reason why the pipe connection doesn't work is pretty simple: the exec'd daemon doesn't know the pipe's file descriptor number. I.e. the --daemon arg for the child could look like "--daemon=\nFD\nNAME" where NAME is the original daemon name, and FD is the pipe's file descriptor. Stefan