]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: listener: improve detection of non-working accept4()
authorWilly Tarreau <w@1wt.eu>
Fri, 31 Jan 2014 18:40:19 +0000 (19:40 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 31 Jan 2014 18:40:19 +0000 (19:40 +0100)
commit818dca50984b758b7ec6ebe8874aeb92594ef446
tree0bcd248debad50d4bd0ce446ecaf5bd643e629ee
parent416ce618be9322d90d1c031bd5300ff280e28568
BUG/MEDIUM: listener: improve detection of non-working accept4()

On ARM, glibc does not implement accept4() and simply returns ENOSYS
which was not caught as a reason to fall back to accept(), resulting
in a spinning process since poll() would call again.

Let's change the error detection mechanism to save the broken status
of the syscall into a local variable that is used to fall back to the
legacy accept().

In addition to this, since the code was becoming a bit messy, the
accept4() was removed, so now the fallback code and the legacy code
are the same. This will also increase bug report accuracy if needed.

This is 1.5-specific, no backport is needed.
src/listener.c
src/session.c