mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-26 21:55:44 +07:00
util: return exit status in wait_for_terminate_and_warn()
This commit is contained in:
parent
46824d0e6b
commit
0a27cf3f32
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user