]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG: cli: support closing "hard" using close() in addition to fd_delete()
authorWilly Tarreau <w@1wt.eu>
Tue, 5 Nov 2024 16:43:35 +0000 (17:43 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 5 Nov 2024 17:57:43 +0000 (18:57 +0100)
commit0f1d37a4794072f53b8eb20a6c770d8cc0a1cefb
tree6a1d917cb62a237aef14213dd3de4dbb22d31499
parent393957908bf492ff6660fba239106f0da7988fe8
DEBUG: cli: support closing "hard" using close() in addition to fd_delete()

"debug dev close <fd>" currently closes that FD using fd_delete() after
checking that it's known from the fdtab. Sometimes we also want to just
perform a pure close() of FDs not in the fdtab (pollers, etc) in order
to provoke certain error cases. The optional "hard" argument to the
command will make it use a plain close() instead of fd_delete() and skip
the fd owner check. The main visible effect when closing a traffic socket
with it is that instead of dying from a double fd_delete() by seeing that
fd.owner is already 0, it will die during the next fd_insert() seeing that
fd.owner was not 0.
src/debug.c