From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu 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 12:34:51 -0800 (PST) Message-ID: <200811252034.mAPKYpDa018369@mothra.ics.uci.edu> References: <200811250620.mAP6KrBx009202@mothra.ics.uci.edu> <200811251527.mAPFR3Bk016272@mothra.ics.uci.edu> Reply-To: Dan Nicolaescu , 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 1227646247 4671 80.91.229.12 (25 Nov 2008 20:50:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2008 20:50:47 +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 Tue Nov 25 21:51:49 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 1L54sl-0004GP-4V for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Nov 2008 21:51:39 +0100 Original-Received: from localhost ([127.0.0.1]:44148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L54rb-0002lO-NP for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Nov 2008 15:50:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L54rX-0002kd-C0 for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2008 15:50:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L54rV-0002jy-QA for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2008 15:50:22 -0500 Original-Received: from [199.232.76.173] (port=36420 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L54rV-0002jo-HH for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2008 15:50:21 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39424) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L54rU-0006Ix-S5 for bug-gnu-emacs@gnu.org; Tue, 25 Nov 2008 15:50:21 -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 mAPKoAC9031079; Tue, 25 Nov 2008 12:50:11 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAPKj4n3029301; Tue, 25 Nov 2008 12:45:04 -0800 X-Loop: don@donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , don@donarmstrong.com Resent-Date: Tue, 25 Nov 2008 20:45:03 +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.122764530526932 (code B ref 1107); Tue, 25 Nov 2008 20:45:03 +0000 Original-Received: (at 1107) by emacsbugs.donarmstrong.com; 25 Nov 2008 20:35:05 +0000 Original-Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAPKZ2BG026702 for <1107@emacsbugs.donarmstrong.com>; Tue, 25 Nov 2008 12:35:03 -0800 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by barrelv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id mAPKYp1v006378; Tue, 25 Nov 2008 12:34:51 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id mAPKYpDa018369; Tue, 25 Nov 2008 12:34:51 -0800 (PST) In-Reply-To: (Adrian Robert's message of "Tue, 25 Nov 2008 15:08:31 -0500") Original-Lines: 36 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: mAPKYp1v006378 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 25 Nov 2008 15:50:22 -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:22686 Archived-At: 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? > 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? 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'. So does emacs -Q -f server-start work now? (You reported problems in a previous message...)