That is because the serious limitation of select imposing a limit on the values a file descriptor can have, is mentioned too late in the documentation in the notes section. The manpage should warn and refer to poll as soon as possible. (patch attached)
From ca3f1dcc2281ff7bdd14f80a758b31239571d5cd Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos <nmav@xxxxxxxxxx> Date: Fri, 29 Jan 2016 10:03:45 +0100 Subject: [PATCH] select.2: Mention the fd size limitation early and refer to poll That is because the serious limitation of select imposing a limit on the values a file descriptor can have, is mentioned too late in the documentation in the notes section. The manpage should warn and refer to poll as soon as possible. Signed-off-by: Nikos Mavrogiannopoulos <nmav@xxxxxxxxxx> --- man2/select.2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/man2/select.2 b/man2/select.2 index 151932e..6c76e1c 100644 --- a/man2/select.2 +++ b/man2/select.2 @@ -91,6 +91,13 @@ perform a corresponding I/O operation (e.g., without blocking, or a sufficiently small .BR write (2)). .PP +The file descriptors +.BR select () +can monitor cannot be larger than +.B FD_SETSIZE. +.BR poll (2), +does not have this limitation. +.PP The operation of .BR select () and -- 2.5.1