Subject: bug#33847: 27.0.50; emacsclient does not find server socket

From: Ulrich Mueller <[email-masked]>
Date: Fri, 28 Dec 2018 07:37:52 +0100

>>>>> On Wed, 26 Dec 2018, Paul Eggert wrote:

>> can't the socket be placed in ${HOME}/.emacs.d/ which is already used
>> in the TCP case? The socket could be named server-<system-name>, in
>> order to avoid issues with NFS mounted directories.

> That would cause problems when Emacs crashes or the system reboots,
> since the directory wouldn't be cleaned up automatically. So although
> we could add this as an option, I'm a bit leery of making it the
> default.

The only problem I see is that it would leave a stale socket file
behind, when Emacs is not properly terminated. That file would be
deleted/replaced the next time an Emacs server is started.

I guess in the typical use case we are talking about a single inode.
If the home directory is NFS mounted it may be one inode per machine.
I think that's a small price to pay, for a solution that would be both
very simple, would be available on all systems, and won't suffer from
security issues.