The epoll_create manpage (current version as of 2010-11-28) contains: SYNOPSIS ... int epoll_create(int size); ... DESCRIPTION ... (Nowadays, size is ignored; see NOTES below.) ... ERRORS EINVAL size is not positive. ... NOTES Since Linux 2.6.8, the size argument is unused. ... on the other hand, fs/eventpoll.c contains: SYSCALL_DEFINE1(epoll_create, int, size) { if (size <= 0) return -EINVAL; return sys_epoll_create1(0); } The size parameter is not ignored as stated in the manpage. Please correct the manpage or remove the check inside the implementation.
Thanks for this report Joern. Of course, the right change here is to fix the documentation. I applied this patch for man-pages-3.22: --- a/man2/epoll_create.2 +++ b/man2/epoll_create.2 @@ -44,7 +44,7 @@ is not the maximum size of the backing store but just a hint to the kernel about how to dimension internal structures. (Nowadays, .I size -is ignored; see NOTES below.) +is unused; see NOTES below.) .BR epoll_create () returns a file descriptor referring to the new epoll instance. @@ -118,7 +118,7 @@ is Linux-specific, and was introduced in kernel 2.5.44. .SH NOTES Since Linux 2.6.8, the .I size -argument is unused. +argument is unused, but must be greater than zero. (The kernel dynamically sizes the required data structures without needing this initial hint.) .SH "SEE ALSO"
(In reply to comment #1) > I applied this patch for man-pages-3.22: 0) That actually was man-pages-3.32. 1) This bug can be CLOSED (and set to FIXED, I assume).