]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mworker: don't deinit the poller fd when in wait mode
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 11 Sep 2018 08:06:24 +0000 (10:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Sep 2018 08:21:58 +0000 (10:21 +0200)
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().

src/haproxy.c

index 1fa1d3cd77f86b306b282d8bbaf79e40a307fe68..9dfdf9bf4eb9ccf88d9c4a91f8d2805192b570a0 100644 (file)
@@ -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);