libowfat/io/io_nonblock.c
2003-09-02 00:14:04 +00:00

12 lines
273 B
C

#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include "io_internal.h"
void io_nonblock(int64 d) {
io_entry* e=array_get(&io_fds,sizeof(io_entry),d);
if (e && e->nonblock) return;
fcntl(d,F_SETFL,fcntl(d,F_GETFL,0) | O_NDELAY);
if (e) e->nonblock=1;
}