diff options
-rw-r--r-- | discover/paths.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/discover/paths.c b/discover/paths.c index 5e577eb..58fbffd 100644 --- a/discover/paths.c +++ b/discover/paths.c @@ -131,7 +131,10 @@ static void load_process_to_local_file(struct load_task *task, task->result->status = rc ? LOAD_ERROR : LOAD_ASYNC; } else { rc = process_run_sync(task->process); - task->result->status = rc ? LOAD_ERROR : LOAD_OK; + if (rc || WEXITSTATUS(task->process->exit_status)) + task->result->status = LOAD_ERROR; + else + task->result->status = LOAD_OK; process_release(task->process); task->process = NULL; } |