lib/process: Add helper for check process clean exit
[petitboot] / lib / process / process.c
index 3c81b29340f8ae69ccd99f4ebe10133eb408e47d..86c7fbbf246c374d50f1c23a637118079817a27c 100644 (file)
@@ -447,3 +447,9 @@ int process_run_simple(void *ctx, const char *name, ...)
 
        return rc;
 }
+
+bool process_exit_ok(struct process *process)
+{
+       return WIFEXITED(process->exit_status) &&
+               WEXITSTATUS(process->exit_status) == 0;
+}