[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The emacsclient socket vs. etc/emacs.bash

From: Juanma Barranquero
Subject: Re: The emacsclient socket vs. etc/emacs.bash
Date: Sat, 9 Dec 2006 00:47:45 +0100

On 12/9/06, Stefan Monnier <address@hidden> wrote:

The problem is to remove the socket file when the server quits, because we
don't know for sure that it's still our socket.

In the method I'm suggesting, each Emacs instance should assume no one
stole its socket (or server file) if it didn't acknowledge and accept
the steal, and in this case, it can remove the file before sending
back the acknowledge. If it ends normally without surrendering the
server status, it just deletes the file.

Yes, that's a possible way to do it better.  But it still will not prevent
leftover socket files in case Emacs exited precipitously.

No, but if an instance finds a socket/server-file and no one answers
its request, it can assume the socket is a leftover, because there's
no one listening out there. There's a tiny possibility for a race
condition, but it would still be nicer to the user than the current "I
can assume nothing, so I'll overwrite" method used now.

Not so sure since you don't whether whether you're talking (though the
socket) to yourself or to some other process.

I thought the socket name includes the pid of the Emacs instance; the
server-file certainly does, so for TCP sockets it's easy to know.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]