SMF could allow the operator to ignore failing start methods
An SMF service with the transient duration is, in some senses, akin to dropping something in an
/etc/rc.local file. It is relatively easy in the latter, simpler, mechanism to ignore the exit status of the program being run. It is somewhat harder in SMF. You might expect that you can provide a trivial start method like:
failing_thing || true
But this falls afoul of the fact that SMF runs the script as:
sh -c "exec YOUR_METHOD"
Which expands to:
sh -c "exec failing_thing || true"
failing_thing succeeds, and then the shell is gone (because it was told to use
exec() not just
fork()) and the thing exits non-zero and SMF marks the service failed.
We already have a property,
startd/ignore_error that accepts a list of errors to ignore that can presently include
core. We could add a new option to this list,
start_failure, which would ignore a non-zero exit code from the start method. This would likely only make sense in transient duration services, as if the contract is then empty the service will fail for that reason -- but that's fine.
No data to display