diff --git a/etc/emacs.service b/etc/emacs.service index c99c6779f58..809c49cdbc5 100644 --- a/etc/emacs.service +++ b/etc/emacs.service @@ -9,7 +9,11 @@ Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/ [Service] Type=notify ExecStart=emacs --fg-daemon -ExecStop=emacsclient --eval "(kill-emacs)" + +# Emacs will exit with status 15 after having received SIGTERM, which +# is the default "KillSignal" value systemd uses to stop services. +SuccessExitStatus=15 + # The location of the SSH auth socket varies by distribution, and some # set it from PAM, so don't override by default. # Environment=SSH_AUTH_SOCK=%t/keyring/ssh