In this article
The service documentation explicitly limits this setting to the configured main process and excludes commands such as ExecStartPre, ExecStartPost, ExecStop and ExecReload. The main process itself is determined by the service's type and effective process-tracking configuration. Preventing automatic restart is also different from classifying an exit as successful through another option. A list entry should therefore not be interpreted as a universal ignore rule or a promise that every helper f.
RestartPreventExitStatus is scoped to the main service process, not every command executed during the unit lifecycle. A deployment that assigns the same exit code to a pre-start helper and the server can therefore observe different restart behavior. The status value needs process-role context before an operator concludes that the configured prevention policy was ignored.
The service-manager contract
The service documentation explicitly limits this setting to the configured main process and excludes commands such as ExecStartPre, ExecStartPost, ExecStop and ExecReload. The main process itself is determined by the service’s type and effective process-tracking configuration. Preventing automatic restart is also different from classifying an exit as successful through another option. A list entry should therefore not be interpreted as a universal ignore rule or a promise that every helper failure leaves the unit’s lifecycle unchanged.
Implementation details
Record the exiting process role, effective main-process identity and relevant restart settings together. Use distinct helper and server outcomes when the product needs different recovery policies rather than relying on an unqualified common code. Preserve stop intent separately from spontaneous failure. Inspect list merging and reset behavior when drop-ins contribute configuration, so the observed prevention list is the effective one. Do not change a failure into a success label merely to suppress restart; capacity and request-correctness reporting still need the actual service outcome.
A constructed validation case
Construct a disposable unit whose main program exits with a selected prevented status. Compare a separate activation where a pre-start helper returns that same status under otherwise recorded restart settings. Observe process role, unit outcome and actual restart attempts rather than guessing from the message text. Acceptance requires the documented scope and correct effective configuration, not identical behavior for every command or a claim that restart prevention made an invalid worker usable. Preserve helper and main-process evidence separately in the test record.
Recovery limits
Restart scope is a process-lifecycle rule, not an application error taxonomy. Model failures, invalid configuration and planned shutdown can need different policies. Keep those decisions explicit so an exit-code list does not become an unsupported substitute for understanding which serving process failed and whether useful capacity remains.
Primary references
systemd systemd.service documented interface; systemd systemd.exec documented interface.
This is a proposed service-lifecycle validation, not an executed Retrivium benchmark. Preserve the implementation version and unresolved outcomes; interface documentation does not establish the availability or correctness of an inference service.
Related reading
Desynchronize automatic service restarts with the supported systemd delay; Terminal request records: reconcile stream, usage and logs.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.