Sha256: 989cfd7f11ab8dc60e0d22760ab4c86e90b857be9aff9aeb6019571f1ae1b5f5
Contents?: true
Size: 333 Bytes
Versions: 28
Compression:
Stored size: 333 Bytes
Contents
#include <ruby.h> #include <unistd.h> #include <fcntl.h> static void set_nonblocking(int fd) { int flags = fcntl(fd, F_GETFL); if (flags == -1) rb_sys_fail("fcntl(F_GETFL)"); if ((flags & O_NONBLOCK) == O_NONBLOCK) return; flags = fcntl(fd, F_SETFL, flags | O_NONBLOCK); if (flags == -1) rb_sys_fail("fcntl(F_SETFL)"); }
Version data entries
28 entries across 28 versions & 1 rubygems