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

Lukáš Nykrýn lnykryn at redhat.com
Mon Aug 13 05:10:07 PDT 2012


Lennart Poettering píše v St 08. 08. 2012 v 19:26 +0200:
> 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
> 

Sorry for delay. I have rewrote the patch and added posibility to set
"successful return statuses" and now you can also specify signals.

Lukas 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-service-add-options-RestartPreventExitStatus-and-Suc.patch
Type: text/x-patch
Size: 19143 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20120813/2638a5ce/attachment.bin>


More information about the systemd-devel mailing list