GNU bug report logs - #1058
23.0.60; emacs --daemon should not return until socket is ready

Previous Next

Package: emacs;

Reported by: SRS0+wOMF+22+gmail.com=trentbuck <at> internode.on.net

Date: Tue, 30 Sep 2008 14:10:04 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: SRS0+wOMF+22+gmail.com=trentbuck <at> internode.on.net
Cc: 1058 <at> debbugs.gnu.org, trentbuck <at> gmail.com,
        rfrancoise <at> debian.org
Subject: bug#1058: 23.0.60; emacs --daemon should not return until socket is ready
Date: Wed, 1 Oct 2008 09:51:10 -0700 (PDT)
SRS0+wOMF+22+gmail.com=trentbuck <at> internode.on.net writes:

  > 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

Just curious, what do you get if you do:

emacs -Q --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.

Unfortunately ATM I don't see an easy way to do that.  Ideas/patches are
certainly welcome.




This bug report was last modified 16 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.