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

Version Path
kgio-2.8.0 ext/kgio/nonblock.h
kgio-2.7.4 ext/kgio/nonblock.h
kgio-2.7.3 ext/kgio/nonblock.h
kgio-2.7.2 ext/kgio/nonblock.h
kgio-2.7.1 ext/kgio/nonblock.h
kgio-2.7.0.3.gfd1e ext/kgio/nonblock.h
kgio-2.7.0 ext/kgio/nonblock.h
kgio-2.6.0 ext/kgio/nonblock.h
kgio-2.5.0 ext/kgio/nonblock.h
kgio-2.4.2 ext/kgio/nonblock.h
kgio-2.4.1 ext/kgio/nonblock.h
kgio-2.4.0 ext/kgio/nonblock.h
kgio-2.3.3 ext/kgio/nonblock.h
kgio-2.3.2 ext/kgio/nonblock.h
kgio-2.3.1 ext/kgio/nonblock.h
kgio-2.3.0 ext/kgio/nonblock.h
kgio-2.2.0 ext/kgio/nonblock.h
kgio-2.1.1 ext/kgio/nonblock.h
kgio-2.1.0 ext/kgio/nonblock.h
kgio-2.0.0 ext/kgio/nonblock.h