From 63953420efc0b8f686bfba75572365be10bbaa1f Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 4 Feb 2024 03:07:33 +0000 Subject: slbt_exec_compile(): fix logging of compiler errors. --- src/logic/slbt_exec_compile.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/logic/slbt_exec_compile.c') diff --git a/src/logic/slbt_exec_compile.c b/src/logic/slbt_exec_compile.c index f9cd1d2..16c8332 100644 --- a/src/logic/slbt_exec_compile.c +++ b/src/logic/slbt_exec_compile.c @@ -204,9 +204,13 @@ int slbt_exec_compile( } } - if (((ret = slbt_spawn(ectx,true)) < 0) || ectx->exitcode) { + if ((slbt_spawn(ectx,true) < 0) && (ectx->pid < 0)) { slbt_free_exec_ctx(actx); return SLBT_SYSTEM_ERROR(dctx,0); + + } else if (ectx->exitcode) { + slbt_free_exec_ctx(actx); + return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_COMPILE_ERROR); } if (cctx->drvflags & SLBT_DRIVER_STATIC) @@ -235,9 +239,13 @@ int slbt_exec_compile( } } - if (((ret = slbt_spawn(ectx,true)) < 0) || ectx->exitcode) { + if ((slbt_spawn(ectx,true) < 0) && (ectx->pid < 0)) { slbt_free_exec_ctx(actx); return SLBT_SYSTEM_ERROR(dctx,0); + + } else if (ectx->exitcode) { + slbt_free_exec_ctx(actx); + return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_COMPILE_ERROR); } } -- cgit v1.2.3