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

Lukáš Nykrýn lnykryn at redhat.com
Wed Jul 25 01:26:45 PDT 2012


Zbigniew Jędrzejewski-Szmek píše v St 25. 07. 2012 v 01:19 +0200:
> On 07/24/2012 04:43 PM, Lukas Nykryn wrote:
> > In some cases, like wrong configuration, restarting after error
> > exit code does not help, so administrator can specify RestartIgnoreCodes
> > which will not cause restart of a service.
> Hi,
> 
> maybe this should be made more general, not only limited to restarting:
> wouldn't it be better to simply specify, which exit codes are supposed
> to mean success? Before there was a case with java, which would exit
> returning 1, even on success. It would be nice to solve that problem too.
> 
> Zbyszek

Thanks for the suggestion, I did it this way, because this should be
solution for https://bugzilla.redhat.com/show_bug.cgi?id=807886. I am
not sure if I should rewrite it in more general way. If I am not
mistaken such behavior would also affect for example systemctl status
and then when service fails with wrong configuration, it would show as
success in status.

But I do not say that specifying concrete return codes as success is not
acceptable feature, but I would rather see this two option separately. 
I am going to rewrite this patch to use set instead of array, so I will
also write the second patch with "general approach". 

Lukas



More information about the systemd-devel mailing list