From: Michael Tremer Date: Thu, 30 Jan 2025 10:22:49 +0000 (+0000) Subject: job: Don't lose build status when closing the log file X-Git-Tag: 0.9.30~276 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04fb9ec8ca5deb20b22a4caa8185651637698a5b;p=pakfire.git job: Don't lose build status when closing the log file Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/job.c b/src/pakfire/job.c index b280232e..1b75d4eb 100644 --- a/src/pakfire/job.c +++ b/src/pakfire/job.c @@ -620,6 +620,7 @@ static int pakfire_job_child(struct pakfire_job* job) { struct pakfire_ctx* ctx = NULL; struct pakfire_build* build = NULL; int build_flags = 0; + int status; int r; // Fetch our PID @@ -683,7 +684,7 @@ static int pakfire_job_child(struct pakfire_job* job) { } // Run the build - r = pakfire_build_exec(build, job->pkg, pakfire_job_result, job); + status = pakfire_build_exec(build, job->pkg, pakfire_job_result, job); // Close the log file r = pakfire_log_file_close(job->log.file); @@ -693,7 +694,7 @@ static int pakfire_job_child(struct pakfire_job* job) { } // Signal that the job has finished - r = pakfire_job_finished(job, r); + r = pakfire_job_finished(job, status); if (r < 0) goto ERROR;