[systemd-devel] [PATCH] service: allow service to inhibit respawn with special return code
Lukáš Nykrýn
lnykryn at redhat.com
Fri Jul 27 03:54:24 PDT 2012
Lukáš Nykrýn píše v St 25. 07. 2012 v 10:26 +0200:
> 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
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Here is slightly modified original patch and patch to add possibility to
specify successful return codes.
Lukas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-service-allow-service-to-inhibit-respawn-with-specia.patch
Type: text/x-patch
Size: 7712 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20120727/9a3897f0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-service-allow-to-specify-successful-return-codes.patch
Type: text/x-patch
Size: 11821 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20120727/9a3897f0/attachment-0001.bin>
More information about the systemd-devel
mailing list