From 0c7de072c8f7e358124a8ae6bb8b6c2d074463a9 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Wed, 10 Nov 2021 15:10:00 +0100 Subject: [PATCH] BUG/MINOR: mworker: doesn't launch the program postparser When in wait mode, the mworker-prog postparser is launched, but unfortunately the child structure doesn't contain all required information to be able to launch the test. This test is only required when doing a configuration parsing. Must be backported as far as 2.0. (cherry picked from commit 5f47b2e28050066254397873401d3f087ecef1c1) Signed-off-by: Christopher Faulet (cherry picked from commit 126eee0fcf850b2b3b8f176398aef4fcabeae137) Signed-off-by: Christopher Faulet --- src/mworker-prog.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mworker-prog.c b/src/mworker-prog.c index 126cfab..b035b1c 100644 --- a/src/mworker-prog.c +++ b/src/mworker-prog.c @@ -336,6 +336,11 @@ int cfg_program_postparser() int err_code = 0; struct mworker_proc *child; + /* we only need to check this during configuration parsing, + * wait mode doesn't have the complete description of a program */ + if (global.mode & MODE_MWORKER_WAIT) + return err_code; + list_for_each_entry(child, &proc_list, list) { if (child->reloads == 0 && (child->options & PROC_O_TYPE_PROG)) { if (child->command == NULL) { -- 1.7.10.4