BUG/MINOR: mworker/cli: reload fail with inherited FD
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 18 Oct 2019 19:16:39 +0000 (21:16 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 18 Oct 2019 19:45:42 +0000 (21:45 +0200)
commitf7f488d8e9740d64cf82b7ef41e55d4f36fe1a43
tree4786758d5bbc583ec47af049991f5e5345f222ac
parenta9363eb6a58b3057d7d75ced4c8c711cf093c364
BUG/MINOR: mworker/cli: reload fail with inherited FD

When using the master CLI with 'fd@', during a reload, the master CLI
proxy is stopped. Unfortunately if this is an inherited FD it is closed
too, and the master CLI won't be able to bind again during the
re-execution. It lead the master to fallback in waitpid mode.

This patch forbids the inherited FDs in the master's listeners to be
closed during a proxy_stop().

This patch is mandatory to use the -W option in VTest versions that contain the
-mcli feature.
(https://github.com/vtest/VTest/commit/86e65f1024453b1074d239a88330b5150d3e44bb)

Should be backported as far as 1.9.
src/proxy.c