2 # define EPOLL_CLOEXEC (int)(02000000)
5 #ifndef HAVE_EPOLL_CREATE1
7 * fake epoll_create1() since some systems don't have it.
8 * Don't worry about thread-safety since current Ruby 1.9 won't
9 * call this without GVL.
11 static int my_epoll_create1(int flags
)
13 int fd
= epoll_create(1024); /* size ignored since 2.6.8 */
15 if (fd
< 0 || flags
== 0)
18 if ((flags
& EPOLL_CLOEXEC
) && (fcntl(fd
, F_SETFD
, FD_CLOEXEC
) < 0))
23 int saved_errno
= errno
;
29 # define epoll_create1 my_epoll_create1