>From 1f767a005dc55ac669f0dc400ca1e98ecd43ede5 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Thu, 2 Jan 2020 12:26:07 +0100 Subject: [PATCH] Set known success exit status in emacs.service As otherwise systemd will report and record an unsuccessful exit when terminating the service: systemd[4908]: Stopping Emacs text editor... sh[415489]: Saving file /home/user/.emacs.d/recentf... sh[415489]: Wrote /home/user/.emacs.d/recentf systemd[4908]: emacs-26.service: Main process exited, code=exited, status=15/n/a systemd[4908]: emacs-26.service: Failed with result 'exit-code'. systemd[4908]: Stopped Emacs text editor. systemd[4908]: emacs-26.service: Consumed 1.536s CPU time. --- etc/emacs.service | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/emacs.service b/etc/emacs.service index c99c6779f58..3d03801ba2b 100644 --- a/etc/emacs.service +++ b/etc/emacs.service @@ -14,6 +14,7 @@ ExecStop=emacsclient --eval "(kill-emacs)" # set it from PAM, so don't override by default. # Environment=SSH_AUTH_SOCK=%t/keyring/ssh Restart=on-failure +SuccessExitStatus=15 [Install] WantedBy=default.target -- 2.24.1