glibc's sys/epoll.h defines EPOLL_NONBLOCK for use with epoll_create1; however, the kernel's epoll_create1 function contains the following code:
if (flags & ~EPOLL_CLOEXEC)
Moreover, the kernel's eventpoll.h header does not define EPOLL_NONBLOCK at all. EPOLL_NONBLOCK seems to be a glibc invention that disagrees with the reality of the kernel and which might confuse developers attempting to use this interface.
I believe a little more research should be done into why it was added to begin with, and, unless there's a good reason for its existence, it should be removed. If this flag is really intended by the glibc developers to exist, it should be emulated in userspace by glibc using fcntl since the kernel obviously does not accept it.
Thanks, fixed for glibc 2.18 with this commit:
Author: Andreas Jaeger <firstname.lastname@example.org>
Date: Tue Jan 8 19:32:00 2013 +0100
BZ#14985: Remove erroneous EPOLL_NONBLOCK