From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: SRS0+wOMF+22+gmail.com=trentbuck@internode.on.net Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#1058: 23.0.60; emacs --daemon should not return until socket is ready Date: Tue, 30 Sep 2008 23:13:54 +0930 (CST) Message-ID: <1222782234_2281@mail.internode.on.net> Reply-To: SRS0+wOMF+22+gmail.com=trentbuck@internode.on.net, 1058@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1222870910 16761 80.91.229.12 (1 Oct 2008 14:21:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Oct 2008 14:21:50 +0000 (UTC) Cc: trentbuck@gmail.com, rfrancoise@debian.org To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 01 16:22:39 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 1Kl2U1-0004Kp-Hu for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Oct 2008 16:15:17 +0200 Original-Received: from localhost ([127.0.0.1]:37031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl2Sy-0007zJ-Fm for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Oct 2008 10:14:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KkgEj-0000rb-P4 for bug-gnu-emacs@gnu.org; Tue, 30 Sep 2008 10:30:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KkgEi-0000o0-0E for bug-gnu-emacs@gnu.org; Tue, 30 Sep 2008 10:30:00 -0400 Original-Received: from [199.232.76.173] (port=49048 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KkgEh-0000nK-I3 for bug-gnu-emacs@gnu.org; Tue, 30 Sep 2008 10:29:59 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:41543) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KkgEg-0004QJ-Vd for bug-gnu-emacs@gnu.org; Tue, 30 Sep 2008 10:29:59 -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 m8UETtmK010568; Tue, 30 Sep 2008 07:29:57 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8UEA401005723; Tue, 30 Sep 2008 07:10:04 -0700 X-Loop: don@donarmstrong.com Resent-From: SRS0+wOMF+22+gmail.com=trentbuck@internode.on.net Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 30 Sep 2008 14:10:04 +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 submit@emacsbugs.donarmstrong.com id=B.12227832923665 (code B ref -1); Tue, 30 Sep 2008 14:10:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 30 Sep 2008 14:01:32 +0000 Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8UE1N8C003652 for ; Tue, 30 Sep 2008 07:01:24 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:47012 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Kkfkr-0001s6-US for emacs-pretest-bug@gnu.org; Tue, 30 Sep 2008 09:59:10 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Kkfmx-0006pu-UA for emacs-pretest-bug@gnu.org; Tue, 30 Sep 2008 10:01:21 -0400 Original-Received: from bld-mail07.adl2.internode.on.net ([203.16.214.71]:52355 helo=mail.internode.on.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kkfmx-0006pG-7L for emacs-pretest-bug@gnu.org; Tue, 30 Sep 2008 10:01:19 -0400 Original-Received: from localhost (unverified [118.208.170.75]) by mail.internode.on.net (SurgeMail 3.8f2) with ESMTP id 46131888-1849793 for multiple; Tue, 30 Sep 2008 23:13:54 +0930 (CST) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 30 Sep 2008 10:30:00 -0400 X-Mailman-Approved-At: Wed, 01 Oct 2008 10:01:23 -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:20952 gmane.emacs.pretest.bugs:23125 Archived-At: >From this transcript, you can see that after starting 'emacs --daemon', it takes five seconds before the socket is actually available for emacsclient to talk to it. $ emacs --daemon; while ! ls /tmp/emacs1187/; do sleep 1; done emacs: no process killed ls: cannot access /tmp/emacs1187/: No such file or directory ls: cannot access /tmp/emacs1187/: No such file or directory ls: cannot access /tmp/emacs1187/: No such file or directory ls: cannot access /tmp/emacs1187/: No such file or directory server This is evil; it means that making $ALTERNATE_EDITOR a script that just does emacs --daemon && emacsclient results in a loop, because the socket isn't ready when emacsclient starts -- so emacsclient runs the above script again. For --daemon to be useful to me, it really must not exit until the socket is ready. A filthy workaround might look something like this. #!/bin/bash -e emacs --daemon while ! test -e /tmp/emacs$EUID/server do sleep 1 done emacsclient In GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of 2008-09-28 on elegiac, modified by Debian (emacs-snapshot package, version 1:20080928-1) configured using `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU.utf8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: ESC x r e p o r t SPC e m a c s SPC b u TAB RET Recent messages: ("emacs" "-Q") For information about GNU Emacs and the GNU system, type C-h C-a.