From: William Lallemand Date: Tue, 11 Sep 2018 08:06:24 +0000 (+0200) Subject: MINOR: mworker: don't deinit the poller fd when in wait mode X-Git-Tag: v1.9-dev2~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de0ff5ab20b29ccea612a24fa5b4b03cc1838b0a;p=thirdparty%2Fhaproxy.git MINOR: mworker: don't deinit the poller fd when in wait mode If haproxy failed to load its configuration, the process is reexecuted and it did not init the poller. So we must not try to deinit the poller before the exec(). --- diff --git a/src/haproxy.c b/src/haproxy.c index 1fa1d3cd77..9dfdf9bf4e 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -666,7 +666,8 @@ static void mworker_reload() next_argv[next_argc++] = NULL; } - deinit_pollers(); /* we don't want to leak the poller fd */ + if (getenv("HAPROXY_MWORKER_WAIT_ONLY") == NULL) + deinit_pollers(); /* we don't want to leak the poller fd */ ha_warning("Reexecuting Master process\n"); execvp(next_argv[0], next_argv);