emacs-devel
[Top][All Lists]
Advanced

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

Set known success exit status in emacs.service


From: Florian Schmaus
Subject: Set known success exit status in emacs.service
Date: Thu, 2 Jan 2020 12:40:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1

It appears that the emacs daemon will terminate with an exit code value
'15' once kill-emacs is invoked. If the daemon is run with the example
emacs.service systemd file from the source repository, then systemd
reports and records an unsuccessful exit:

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.

The applied patch adds

SuccessExitStatus=15

to the emacs.service file, which makes systemd recognize the exit as a
successful one.

As I was unable to find documentation about the exit codes of emacs, I
wonder if there are other exit codes besides 0 and 15 that should/could
be considered a successful exit, and hence, should be listed in the
example systemd service file SuccessExitStatus configuration?

- Florian

Attachment: 0001-Set-known-success-exit-status-in-emacs.service.patch
Description: Text Data


reply via email to

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