dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Emacs: Fix socket cleanup

Open TLATER opened this issue 4 years ago • 0 comments

Emacs unconditionally cleans up its socket when it shuts down, but systemd expects the socket to be kept alive.

Hence, we need to teach emacs not to do that.

Seems there's a variable server--external-socket-initialized that will detect if systemd passed the socket to us.

There's also server-sentinel in server.el:396, which cleans up the socket file. Presumably all that needs to be done is to make it check whether an external process created the socket, and if it did, not clean it.

TLATER avatar May 18 '21 10:05 TLATER