From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adrian Robert 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: Tue, 25 Nov 2008 15:08:31 -0500 Message-ID: References: <200811250620.mAP6KrBx009202@mothra.ics.uci.edu> <200811251527.mAPFR3Bk016272@mothra.ics.uci.edu> Reply-To: Adrian Robert , 1107@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1227645058 32585 80.91.229.12 (25 Nov 2008 20:30:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2008 20:30:58 +0000 (UTC) Cc: 1107@emacsbugs.donarmstrong.com To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 25 21:32:00 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 1L54Zh-0005IT-Uk for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Nov 2008 21:31:58 +0100 Original-Received: from localhost ([127.0.0.1]:54467 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L54YY-0000gf-Fs for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Nov 2008 15:30:46 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L54YT-0000fl-SK for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2008 15:30:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L54YS-0000eH-GJ for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2008 15:30:41 -0500 Original-Received: from [199.232.76.173] (port=57059 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L54YS-0000dr-8r for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2008 15:30:40 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46180) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L54YR-0003Ji-IR for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2008 15:30:39 -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 mAPKUB5E026169; Tue, 25 Nov 2008 12:30:11 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAPKF26p021800; Tue, 25 Nov 2008 12:15:02 -0800 X-Loop: don@donarmstrong.com Resent-From: Adrian Robert Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , don@donarmstrong.com Resent-Date: Tue, 25 Nov 2008 20:15:02 +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: Original-Received: via spool by 1107-submit@emacsbugs.donarmstrong.com id=B1107.122764374220542 (code B ref 1107); Tue, 25 Nov 2008 20:15:02 +0000 Original-Received: (at 1107) by emacsbugs.donarmstrong.com; 25 Nov 2008 20:09:02 +0000 Original-Received: from mail-qy0-f20.google.com (mail-qy0-f20.google.com [209.85.221.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAPK8wtB020525 for <1107@emacsbugs.donarmstrong.com>; Tue, 25 Nov 2008 12:09:00 -0800 Original-Received: by qyk13 with SMTP id 13so363648qyk.1 for <1107@emacsbugs.donarmstrong.com>; Tue, 25 Nov 2008 12:08:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=FzCJpgXDDOHsaJ++y0bUNbW5CU6WIzw+OG72k6HFoJo=; b=NmBG8ceRt8KDXt6jcoPNA5aQft3U5Wot8pfGzNiUOtl0jygAG2IPwOh7tu27uXftIQ d+NkzQkVSU4HPBmMQQmsOFB600Lx56U+x8tPAsuIcIBu6Pd502ulCy/CZomG5FThMwaK WSACYLht8l6oVgSz3x/+GxNh32qphRemEi/BI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=D4qmC5gszWCEPaHC6MEWxi4LCqr5zVwCZOuAKxeM14O+UoulMJ3tUs11a8TtE2rxP8 z7RNJVblwSCt/qM0uRgLQo+o4S0icJ4RXUzCAoSOpyxFNZir/7W1D0kdo3De69ao9Aih Fy3DdtuC7+/MEsRoIQfEu5Eu8nEVllz3pnbXI= Original-Received: by 10.214.12.20 with SMTP id 20mr4269667qal.335.1227643733443; Tue, 25 Nov 2008 12:08:53 -0800 (PST) Original-Received: from ?10.0.1.198? ([72.169.150.82]) by mx.google.com with ESMTPS id 4sm6573984yxd.2.2008.11.25.12.08.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 25 Nov 2008 12:08:52 -0800 (PST) In-Reply-To: <200811251527.mAPFR3Bk016272@mothra.ics.uci.edu> X-Mailer: Apple Mail (2.929.2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 25 Nov 2008 15:30:41 -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:22685 Archived-At: OK, it seems that the NS GUI stuff cannot be used in a child process from fork(): http://developer.apple.com/ReleaseNotes/CoreFoundation/CoreFoundation.html (search for "fork"): > Due to the behavior of fork(), CoreFoundation cannot be used on the > child-side of fork(). If you fork(), you must follow that with an > exec*() call of some sort, and you should not use CoreFoundation > APIs within the child, before the exec*(). I put in a really ugly hack that calls execve() in the child after the fork (which then means the daemonization has to be short-circuited the second time), and this works in all respects except: The emacsclient must be given "--socket-name /tmp/emacs503/server" to find the server. Else it gives "No socket or alternate editor." On the other hand, if I start emacs -Q and run 'server-start', this argument is NOT needed, and furthermore if it IS given it, it fails with "connect: Connection refused". Any insight into what is happening here?