]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: epoll: Make sure we can add a new event
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 25 Feb 2025 11:01:40 +0000 (12:01 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 26 Feb 2025 12:00:18 +0000 (13:00 +0100)
commit752c5cba5dc068a472bce344586e1b8c54021367
tree419c17b0bb5df6398fe89453a5010693e1a87f71
parentc5cc09c00dc87fc07a6860483cac4e73e36ebd5b
MEDIUM: epoll: Make sure we can add a new event

Check that the call to epoll_ctl() succeeds, and if it does not, if
we're adding a new event and it fails with EEXIST, then delete and
re-add the event. There are a few cases where we may already have events
for a fd. If epoll_ctl() fails for any reason, use BUG_ON to make sure
we immediately crash, as this should not happen.
src/ev_epoll.c