]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: mworker: sets used or closed worker FDs to -1
authorWilliam Lallemand <wlallemand@haproxy.org>
Mon, 31 Jan 2022 10:01:24 +0000 (11:01 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Mon, 31 Jan 2022 10:10:34 +0000 (11:10 +0100)
commitea7371e93484cd55d712abd720f47bc5fcaa9246
tree37efe1b4f5d7234c93978c7ea82031c06b1b96f9
parent21ea8c519816314e88f65199c8f1d9c1a226f8b1
MINOR: mworker: sets used or closed worker FDs to -1

mworker_cli_sockpair_new() is used to create the socketpair CLI listener of
the worker. Its FD is referenced in the mworker_proc structure, however,
once it's assigned to the listener the reference should be removed so we
don't use it accidentally.

The same must be done in case of errors if the FDs were already closed.
src/cli.c