From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Trent W. Buck" Newsgroups: gmane.emacs.bugs Subject: bug#1058: 23.0.60; emacs --daemon should not return until socket is ready Date: Thu, 2 Oct 2008 10:50:21 +1000 Message-ID: <20081002005020.GB2400@Clio.twb.ath.cx> References: <1222782234_2281@mail.internode.on.net> <200810011651.m91GpAZQ010333@mothra.ics.uci.edu> <87k5csds03.fsf@elegiac.orebokech.com> Reply-To: "Trent W. Buck" , 1058@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 1222909824 31610 80.91.229.12 (2 Oct 2008 01:10:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Oct 2008 01:10:24 +0000 (UTC) Cc: 1058@emacsbugs.donarmstrong.com, Dan Nicolaescu To: Romain Francoise Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 02 03:11:23 2008 connect(): Connection refused 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 1KlCiv-0004vq-Hn for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Oct 2008 03:11:21 +0200 Original-Received: from localhost ([127.0.0.1]:53498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlChs-0007sb-IH for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Oct 2008 21:10:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlChc-0007gl-St for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 21:10:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlChb-0007el-1u for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 21:10:00 -0400 Original-Received: from [199.232.76.173] (port=40128 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlCha-0007eY-P8 for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 21:09:58 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:41445) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KlCha-00082m-3Z for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 21:09:58 -0400 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 m9219tWR029742; Wed, 1 Oct 2008 18:09:56 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m92103sE026678; Wed, 1 Oct 2008 18:00:03 -0700 X-Loop: don@donarmstrong.com Resent-From: "Trent W. Buck" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 02 Oct 2008 01:00:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1058 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1058-submit@emacsbugs.donarmstrong.com id=B1058.122290861225033 (code B ref 1058); Thu, 02 Oct 2008 01:00:02 +0000 Original-Received: (at 1058) by emacsbugs.donarmstrong.com; 2 Oct 2008 00:50:12 +0000 Original-Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.237]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m920o8LV024959 for <1058@emacsbugs.donarmstrong.com>; Wed, 1 Oct 2008 17:50:09 -0700 Original-Received: by rv-out-0506.google.com with SMTP id k40so877708rvb.1 for <1058@emacsbugs.donarmstrong.com>; Wed, 01 Oct 2008 17:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=VsgKsmSnNWqt6yoBH0fIogOf11tzYNGj8+dZ6pdLnJw=; b=rFR6QfzwXoyqazLXGXo1n/THmXiu4k/pD7z4/mWo0dilPyn6cn1BeLfVKgA1B0YlG7 GFnzR8lZS+gonlgXnSppGZZeJ7XLBxk7ZAM0af3l/EepkR5xGrNBfSasH3/ZYU0aLs6f kVJDUhqI/1gZLjxag//FwvPafoI4lc2RYClsI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=b7lL5dEDph99gGKtQWYi/CUBdbaXlFTMTpWIbpAU0yvXyh1B4krN9IwFCTEtjKlVjc 4Am7tuiL3laQcZpTi5h/JnK3eot6BtIrY1VuZgAzUg78F/OW5CtUne2z6dDfxxtK+H46 4TUYZ9Z3K1VkmFM9jU8D/Ou7kfEsSzTZq14/k= Original-Received: by 10.115.76.1 with SMTP id d1mr10050941wal.207.1222908608246; Wed, 01 Oct 2008 17:50:08 -0700 (PDT) Original-Received: from localhost ([203.7.155.64]) by mx.google.com with ESMTPS id t1sm699402poh.13.2008.10.01.17.50.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 01 Oct 2008 17:50:07 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87k5csds03.fsf@elegiac.orebokech.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 01 Oct 2008 21:10:00 -0400 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:20979 Archived-At: On Wed, Oct 01, 2008 at 09:39:40PM +0200, Romain Francoise wrote: >> Just curious, what do you get if you do: emacs -Q --daemon; while ! >> ls /tmp/emacs1187/; do sleep 1; done > > Yes, the delay is caused by my change to load the init file before > starting the server. It's vaguely relevant that I have this in my .emacs: (progn (unless (< emacs-major-version 22) ;; Support multiple, concurrent Emacs servers. (setq server-name (format "server%d" (emacs-pid))) ;; Allow child processes to find the correct one. (setenv "EMACS_SOCKET_FILE" server-name) ;; Have other processes use the youngest server. (defadvice server-start (after multiple-server-start) (make-symbolic-link server-name (concat server-socket-dir "/server") t)) (ad-activate 'server-start)) (server-start)) and an emacsclient wrapper that includes ## In M-x shell always use the focused emacs, even if there are ## other Emacs servers. Requires non-standard $EMACS_SOCKET_FILE, ## which is set in my .emacs. Needs Emacs 22 or better. if [[ $EMACS_SOCKET_FILE && $INSIDE_EMACS && $v -ge 22 ]] ## With DISPLAY emacsclient tries to pop up an X frame. then exec env -u DISPLAY emacsclient -s "$EMACS_SOCKET_FILE" "$@" fi