Sha256: ea87a1fb5784162cc992050e6dd8635f6ca6c29c86fe8dacbe26182656f8ef3b
Contents?: true
Size: 627 Bytes
Versions: 7
Compression:
Stored size: 627 Bytes
Contents
#ifndef EPOLL_CLOEXEC # define EPOLL_CLOEXEC (int)(02000000) #endif #ifndef HAVE_EPOLL_CREATE1 /* * fake epoll_create1() since some systems don't have it. * Don't worry about thread-safety since current Ruby 1.9 won't * call this without GVL. */ static int my_epoll_create1(int flags) { int fd = epoll_create(1024); /* size ignored since 2.6.8 */ if (fd < 0 || flags == 0) return fd; if ((flags & EPOLL_CLOEXEC) && (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0)) goto err; return fd; err: { int saved_errno = errno; close(fd); errno = saved_errno; return -1; } } # define epoll_create1 my_epoll_create1 #endif
Version data entries
7 entries across 7 versions & 1 rubygems