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

Lennart Poettering lennart at poettering.net
Wed Aug 8 10:26:48 PDT 2012


On Mon, 06.08.12 17:16, Lukáš Nykrýn (lnykryn at redhat.com) wrote:

> Again thanks for review. Here is modified patch.
> If you think that it would be better to add signal stuff before
> accepting this patch I will not disagree.

> +                r = set_put(*set, INT_TO_PTR(val));

Hmm, so I was about to merge this, but there is a problem here: exit
code 0 is added to the set as NULL, and that's what we return if
something is *not* in the set. So we'll always mishandle exit code 0
like this.

We probably need some code here that just adds one to all exit codes, so
that we can safely distuingish exit code 0 from "not in this set". And
that probably means the parsing function needs to be renamed a bit, to
include "plus_one" or so...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list