Browse Source

set flag only if setting to non-blocking worked

master
Felix von Leitner 18 years ago
parent
commit
edc19c13b1
  1. 4
      io/io_nonblock.c

4
io/io_nonblock.c

@ -5,6 +5,6 @@
void io_nonblock(int64 d) {
io_entry* e=array_get(&io_fds,sizeof(io_entry),d);
fcntl(d,F_SETFL,fcntl(d,F_GETFL,0) | O_NDELAY);
if (e) e->nonblock=1;
if (fcntl(d,F_SETFL,fcntl(d,F_GETFL,0) | O_NDELAY)==0)
if (e) e->nonblock=1;
}

Loading…
Cancel
Save