[systemd-devel] [PATCH] service: allow service to inhibit respawn with special return code

Lennart Poettering lennart at poettering.net
Mon Aug 6 04:16:02 PDT 2012


On Mon, 06.08.12 12:06, Kay Sievers (kay at vrfy.org) wrote:

> 
> On Mon, Aug 6, 2012 at 2:14 AM, Colin Guthrie <gmane at colin.guthr.ie> wrote:
> > 'Twas brillig, and Lennart Poettering at 03/08/12 19:46 did gyre and gimble:
> >> Maybe DontRestartExitStatus=? The libc calls the generalization of
> >> exit code and exit signal the "exit status", so that sounds like the
> >> best term to use here.
> >
> > Would InhibitRestartExitStatus= work for you? Something feels wrong with
> > Dont* (partly because "don't" is a contraction of "do not" and
> > DoNotRestartExitStatus just feels wrong too).
> >
> > Not sure if "Inhibit*" is maybe used somewhere already that would make
> > this less desirable tho'.
> 
> We have:
>   Restart=on-success | on-failure | ...
> 
> Does this setting really binds to the "Restart" logic only?

Yes it does. PreventRestartExitStatus= would configure something that is
orthogonal to failure/success.

> How about:
>   ExitStatusFailure=
>   ExitStatusSuccess=

I'd claim that failure/success should be orthogonal to the restart
logic, and furthermore that success and failure should be parititions of
the exit status set, i.e. all exits that are not failure are success and
all that are success are not failure, and there is nothing but
success/failure in the set.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list