]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: listener: detect and handle shared sockets stopped in other processes
authorWilly Tarreau <w@1wt.eu>
Tue, 13 Oct 2020 15:46:05 +0000 (17:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 13 Oct 2020 16:15:33 +0000 (18:15 +0200)
commit258b351704055c03f3358b8b44d74ddf784c881c
treeb73263c00172dd6d38fb8abba3febd3a70ff5637
parent85d2ba6b78f12939ecaf8f3dcad8a693da1c8b66
BUG/MINOR: listener: detect and handle shared sockets stopped in other processes

It may happen that during a temporary listener pause resulting from a
SIGTTOU, one process gets one of its sockets disabled by another process
and will not be able to recover from this situation by itself. For the
protocols supporting this (TCPv4 and TCPv6 at the moment) this situation
is detectable, so when this happens, let's put the listener into the
PAUSED state so that it remains consistent with the real socket state.
One nice effect is that just sending the SIGTTIN signal to the process
is enough to recover the socket in this case.

There is no need to backport this, this behavior has been there forever
and the fix requires to reimplement the getsockopt() call there.
src/listener.c