From fc9294cb6f37fe41a9360975d20053fc82fb177f Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 22 Jun 2018 10:34:33 +0200 Subject: [PATCH] epoll_wait.2: Note that epoll_wait() round robins through the set of ready descriptors Signed-off-by: Michael Kerrisk --- man2/epoll_wait.2 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/man2/epoll_wait.2 b/man2/epoll_wait.2 index 5ec69ef00..2f2e4e3e6 100644 --- a/man2/epoll_wait.2 +++ b/man2/epoll_wait.2 @@ -217,6 +217,18 @@ it will cause the .BR epoll_wait () call to unblock. .PP +If more than +.I maxevents +file descriptors are ready when +.BR epoll_wait () +is called, then successive +.BR epoll_wait () +calls will round robin through the set of ready file descriptors. +This behavior helps avoid starvation scenarios, +where a process fails to notice that additional file descriptors +are ready because it focuses on a set of file descriptors that +are already known to be ready. +.PP Note that it is possible to call .BR epoll_wait () on an