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

David Strauss david at davidstrauss.net
Mon Aug 6 23:01:15 PDT 2012


On Sat, Aug 4, 2012 at 4:46 AM, Lennart Poettering
<lennart at poettering.net> wrote:
> (But please, don't implement this bit just yet, let's wait for somebody
> actually needing this. Note though, that Upstart actually does have
> functionality like this).

There are broken daemons like the "cluster" support in node.js that
return non-zero on clean shutdowns. While this is broken behavior, it
seems the systemd standard is to support broken/non-standard behavior
with optional settings. (That is, the default in systemd is a
well-behaved application.)

I believe any specification of a service's normal exit values ought to
be orthogonal to restart behavior. This is because a clean exit value
affects more than restarts. If I do a systemctl stop on a node.js
cluster application and it returns "1," I want that treated as a clean
exit. Allowing specification of clean exit values is key to systemctl
--failed having useful output in some situations.

-- 
David Strauss
   | david at davidstrauss.net


More information about the systemd-devel mailing list