mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
exec-util: propagate error in wait_for_terminate_and_check()
Then, the two error handlings becomes consistent with the one in execute_directories().
This commit is contained in:
parent
b9fadf2e2c
commit
65cd9c7251
|
@ -151,10 +151,9 @@ static int do_execute(
|
|||
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) {
|
||||
|
@ -186,6 +185,8 @@ static int do_execute(
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue