]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cli: add mworker_accept_wrapper to 'show fd'
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 20 Nov 2018 16:36:51 +0000 (17:36 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 22 Nov 2018 10:42:51 +0000 (11:42 +0100)
In the output of 'show fd', the worker CLI's socketpair was still
handled by an "unknown" function. That can be really confusing during
debug. Fixed it by showing "mworker_accept_wrapper" instead.

include/types/global.h
src/cli.c

index 02b9c26ae181e7b320455033640d9dd206ee7647..7c6f9542013d1b7515f6d83b06af4f19a8cdf2ee 100644 (file)
@@ -272,6 +272,8 @@ void hap_register_post_deinit(void (*fct)());
 void hap_register_per_thread_init(int (*fct)());
 void hap_register_per_thread_deinit(void (*fct)());
 
+void mworker_accept_wrapper(int fd);
+
 #endif /* _TYPES_GLOBAL_H */
 
 /*
index 4356586bf6c04459d6f720cf6df9e7ed76a690e7..ef58ba616cd3725291dd3676a6877f2d86d2b1dc 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -921,6 +921,7 @@ static int cli_io_handler_show_fd(struct appctx *appctx)
                             (fdt.iocb == dgram_fd_handler) ? "dgram_fd_handler" :
                             (fdt.iocb == listener_accept)  ? "listener_accept" :
                             (fdt.iocb == poller_pipe_io_handler) ? "poller_pipe_io_handler" :
+                            (fdt.iocb == mworker_accept_wrapper) ? "mworker_accept_wrapper" :
                             "unknown");
 
                if (fdt.iocb == conn_fd_handler) {