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 16:15:24 -0500 Message-ID: References: <200811250620.mAP6KrBx009202@mothra.ics.uci.edu> <200811251527.mAPFR3Bk016272@mothra.ics.uci.edu> <200811252034.mAPKYpDa018369@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 1227648673 14467 80.91.229.12 (25 Nov 2008 21:31:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2008 21:31:13 +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 22:32:15 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 1L55W2-0003CD-GZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Nov 2008 22:32:14 +0100 Original-Received: from localhost ([127.0.0.1]:45432 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L55Us-0003iM-Sn for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Nov 2008 16:31:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L55Uo-0003iG-OD for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2008 16:30:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L55Um-0003i3-7p for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2008 16:30:57 -0500 Original-Received: from [199.232.76.173] (port=47736 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L55Um-0003i0-0X for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2008 16:30:56 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:44988) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L55Ul-0004WV-Gk for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2008 16:30:55 -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 mAPLUAMf009071; Tue, 25 Nov 2008 13:30:11 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAPLP4xN007410; Tue, 25 Nov 2008 13:25:04 -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 21:25:04 +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.12276477495953 (code B ref 1107); Tue, 25 Nov 2008 21:25:04 +0000 Original-Received: (at 1107) by emacsbugs.donarmstrong.com; 25 Nov 2008 21:15:49 +0000 Original-Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAPLFk88005947 for <1107@emacsbugs.donarmstrong.com>; Tue, 25 Nov 2008 13:15:47 -0800 Original-Received: by yx-out-2324.google.com with SMTP id 8so97900yxg.31 for <1107@emacsbugs.donarmstrong.com>; Tue, 25 Nov 2008 13:15:45 -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=bUtT9XhkgdxFPtrpSsG6W+12qGwzINWu4PRbuMBBDLQ=; b=Y4Pr6Y3RprPPfI/cTlIpg+hbEfAN/MUr+mP1p2avBYfvedKCmu7zdAXsnikhmFbldg RvXQdkCcXOQoy7z1JvEuZtKHm3StocWSRaN34WcuPr+3GN59rX8pPz5cPl7CP41Se6VJ 0gE/3To+6F67bJ00e6urr02jIlamCA3Ysi5aU= 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=TJpU4mnRN7VmD9ZNyPGaS2RmYagcEZfCAb/S1djOt3/c8ux3HscNrnDEd5md6r//4H L55C5I6jmutEYDID5FlHgVvct1ie8LxnOvasOgbGYFCDAW2fV+kN1lHt2LgpWwkd3XyF HH+G3o1cNVkLk5csjot/AkkOtDb32MQ7c7ntI= Original-Received: by 10.90.53.4 with SMTP id b4mr3005326aga.88.1227647745711; Tue, 25 Nov 2008 13:15:45 -0800 (PST) Original-Received: from ?10.0.1.198? ([72.169.150.82]) by mx.google.com with ESMTPS id 6sm7044300agb.22.2008.11.25.13.15.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 25 Nov 2008 13:15:44 -0800 (PST) In-Reply-To: <200811252034.mAPKYpDa018369@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 16:30:57 -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:22688 Archived-At: On Nov 25, 2008, at 3:34 PM, Dan Nicolaescu wrote: > Adrian Robert writes: > >> 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*(). > > Bleah, how ugly. Do you know if this is also a problem if you never > use > CoreFoundation (whatever that is) before the fork() call? The problem is AFTER the fork. CoreFoundation means any use of Cocoa GUI stuff. >> 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? > > What is (daemonp) returning? When using --daemon, if the value > returned by > (daemonp) is a string is used to set `server-name', before calling > `server-start'. If run with --daemon now, it returns "t". If run emacs -Q then "server-start" it returns "nil". server-name is "server" in both cases. Here's some more info. If I do 'lsof | grep ', when running --daemon, I get: Emacs 6608 arobert 3u unix 0x11bf3110 0t0 / tmp/emacs503/server whereas when running normal+server-start I get: Emacs 6600 arobert 6u unix 0x11bf3110 0t0 / var/folders/90/90K8geLYFgW7CC5i5eRKmk+++TQ/-Tmp-/emacs503/server Does this tell anything? I'm not too knowledgeable about sockets, but the second one looks more "official".