]> err.no Git - systemd/commitdiff
util: return exit status in wait_for_terminate_and_warn()
authorLennart Poettering <lennart@poettering.net>
Mon, 14 Mar 2011 01:33:51 +0000 (02:33 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 14 Mar 2011 02:12:25 +0000 (03:12 +0100)
src/quotacheck.c
src/util.c

index 55c2f0c6d68f242a50e511ac74523374a7c7d660..da2da3b2e05adca5ddcc79ec6452ab0d0e444e51 100644 (file)
@@ -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;
index ee6217d64ca8f494bdaf156b2a0123f2b46fd7ac..b2baa1ba29aacb067bf02ad64d3d14badc87ea94 100644 (file)
@@ -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);