valis / Reference / API reference
Exit status - API reference
Exported surface for the exit-status subsystem. Part of the API reference.
Package valis/src/exit-status
Generic functions
exit-class
(exit-class condition)
Which class of exit CONDITION ends a run with when nothing handles it: :refused when the same launch would be refused the same way on every restart, :transient when a restart is expected to succeed, and :fault when nothing has said. The run modes in src/main.lisp declare the class of each condition they can end on whose answer is known, one method each, and each method's documentation names the reason; a condition with no method of its own is a fault.
Functions
condition-exit-status
(condition-exit-status condition)
The process exit status for a run CONDITION ended.
exit-status
(exit-status class)
The process exit status for CLASS: :success, :refused, :transient or :fault.
Constants
+exit-fault+
A failure nothing has classified. It is not known to be the same on every restart, so it is left restartable. The unit retries it, like a transient failure, without giving up, backing off from 1 second to 5 minutes between attempts.
+exit-refused+
EXCONFIG from sysexits.h: the run was refused for a reason that will be the same on every restart, such as a malformed launch, a missing or invalid setting, or a binary built without something it needs. The unit names this status in RestartPreventExitStatus, so the node stays down until its owner changes what was refused, instead of failing the same way in a loop that hides the reason.
+exit-success+
The run ended because it was asked to, or finished what it was asked to do.
+exit-transient+
EXTEMPFAIL from sysexits.h: the run failed on something that is expected to come back by itself, such as a dependency that did not answer in time, a lock another process still held, or memory that ran out. The unit retries it without giving up, backing off from 1 second to 5 minutes between attempts, so the node comes back by itself once the cause clears.