]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: fd: support broadcasting updates for foreign groups in updt_fd_polling
authorWilly Tarreau <w@1wt.eu>
Fri, 15 Jul 2022 18:12:31 +0000 (20:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Jul 2022 18:25:41 +0000 (20:25 +0200)
commitcfdd20a0b2d3c49db91a37f8b7b65e5ca5dd2e2b
tree98b7a2291a4cbfadc71b5e777b44561f0342172e
parent1f947cb39ed92036131d71ea06404429208c4be3
MEDIUM: fd: support broadcasting updates for foreign groups in updt_fd_polling

We're still facing the situation where it's impossible to update an FD
for a foreign group. That's of particular concern when disabling/enabling
listeners (e.g. pause/resume on signals) since we don't decide which thread
gets the signal and it needs to process all listeners at once.

Fortunately, not that much is unprotected in FDs. This patch adds a test for
tgid's equality in updt_fd_polling() so that if a change is applied for a
foreing group, then it's detected and taken care of separately. The method
consists in forcing the update on all bound threads in this group, adding it
to the group's update_list, and sending a wake-up as would be done for a
remote thread in the local group, except that this is done by grabbing a
reference to the FD's tgid.

Thanks to this, SIGTTOU/SIGTTIN now work for nbtgroups > 1 (after that was
temporarily broken by "MEDIUM: fd/poller: make the update-list per-group").
src/fd.c