-
Notifications
You must be signed in to change notification settings - Fork 331
Description
The function PropExecStart has an argument uncleanIsFailure of type bool, which is passed into the UncleanIsFailure property of the execStart struct. The name of the argument and property suggests that setting this flag to true leads to unclean exits (i.e. exit code != 0) being treated as failures, and that setting it to false leads to these exit codes being treated as success.
However the opposite is the case: setting the flag to true has the same effect as starting an ExecStart line in a service unit file with -, i.e. the unclean exit is ignored, while setting it to false achieves the default behaviour of unclean exits being treated as failures.
This can be seen in the systemd source code, for example here: https://github.com/systemd/systemd/blob/ab2bc40dcd4e234c50268815eef92421f26199c1/src/run/run.c#L1644
r = sd_bus_message_append(m, "b", arg_ignore_failure);