Commit 0a27cf3f authored by Lennart Poettering's avatar Lennart Poettering
Browse files

util: return exit status in wait_for_terminate_and_warn()

parent 46824d0e
......@@ -107,7 +107,7 @@ int main(int argc, char *argv[]) {
_exit(1); /* Operational error */
}
r = wait_for_terminate_and_warn("quotacheck", pid) >= 0 ? EXIT_SUCCESS : EXIT_FAILURE;
r = wait_for_terminate_and_warn("quotacheck", pid) == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
finish:
return r;
......
......@@ -3616,7 +3616,7 @@ int wait_for_terminate_and_warn(const char *name, pid_t pid) {
if (status.si_code == CLD_EXITED) {
if (status.si_status != 0) {
log_warning("%s failed with error code %i.", name, status.si_status);
return -EPROTO;
return status.si_status;
}
log_debug("%s succeeded.", name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment