The epoll_create manpage (current version as of 2010-11-28) contains:
int epoll_create(int size);
(Nowadays, size is ignored; see NOTES below.)
EINVAL size is not positive.
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)
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:
@@ -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.
-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.
Since Linux 2.6.8, the
-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).