Then, the two error handlings becomes consistent with the one in
execute_directories().
t = NULL;
} else {
r = wait_for_terminate_and_check(t, pid, WAIT_LOG);
- if (FLAGS_SET(flags, EXEC_DIR_IGNORE_ERRORS)) {
- if (r < 0)
- continue;
- } else if (r > 0)
+ if (r < 0)
+ return r;
+ if (!FLAGS_SET(flags, EXEC_DIR_IGNORE_ERRORS) && r > 0)
return r;
if (callbacks) {
assert(t);
r = wait_for_terminate_and_check(t, pid, WAIT_LOG);
+ if (r < 0)
+ return r;
if (!FLAGS_SET(flags, EXEC_DIR_IGNORE_ERRORS) && r > 0)
return r;
}