GNU bug report logs -
#1058
23.0.60; emacs --daemon should not return until socket is ready
Previous Next
Full log
View this message in rfc822 format
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.