[systemd-devel] [PATCH] systemctl: fix and refactor wait_for_jobs

Thomas H.P. Andersen phomes at gmail.com
Sat Dec 7 13:44:11 PST 2013


On Sat, Dec 7, 2013 at 5:37 PM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> On Sat, Dec 07, 2013 at 01:21:10PM +0100, Thomas H.P. Andersen wrote:
>> I was a bit unsure what to do here. We can be waiting for multiple
>> jobs that each can fail. We could return an error on the first failure
>> but then we would not call log_error for the remaining issues. The
>> question is then what to return in the case of multiple errors? With
>> this patch (and the behavior before the sd-bus port) the last error
>> encountered is returned as we just overwrite the value in r.
> Maybe make it the first error? We usually try to return the first,
> as it is most likely to be meaningful.
Thanks. Pushed with the change to store and eventually return the
first error. I also took the same approach for sd_bus_filter_remove.
If an error is already encountered then we ignore its return code.


More information about the systemd-devel mailing list