]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: cli: worker socketpair is unstoppable
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 16 Nov 2018 15:57:22 +0000 (16:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 16 Nov 2018 16:05:40 +0000 (17:05 +0100)
In master-worker mode, the socketpair CLI listener of the worker is now
marked unstoppable, which allows to connect to the CLI of an old process
which is in a leaving state, allowing to debug it.

src/cli.c

index 85e344d3013fc28c4bd1df02886d5a768c168b7d..720a9b4516575bce1799248dab0d40d6e4af462d 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -2336,7 +2336,7 @@ int mworker_cli_sockpair_new(struct mworker_proc *mworker_proc, int proc)
                l->backlog = global.stats_fe->backlog;
                l->accept = session_accept_fd;
                l->default_target = global.stats_fe->default_target;
-               l->options |= LI_O_UNLIMITED;
+               l->options |= (LI_O_UNLIMITED | LI_O_NOSTOP);
                /* it's a sockpair but we don't want to keep the fd in the master */
                l->options &= ~LI_O_INHERITED;
                l->nice = -64;  /* we want to boost priority for local stats */