Subject: bug#1058: 23.0.60; emacs --daemon should not return until socket is ready

From: "Trent W. Buck" <[email-masked]>
Date: Thu, 2 Oct 2008 10:43:24 +1000

On Wed, Oct 01, 2008 at 09:51:10AM -0700, Dan Nicolaescu wrote:
>> 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

I get the same problem.  Running c++ elsewhere and starting Emacs
nicely, I managed to get the delay up to 17 seconds.

$ nice -n 19 emacs -Q --daemon; until ls /tmp/emacs1187/; do sleep 1; done
ls: cannot access /tmp/emacs1187/: No such file or directory
[repeats 16 times]
server