Blocking and Non-blocking Access A system call can be blocking If you want to read data but there is no data yet If you want to write and there is no buffer space Blocking calls can return EINTR read(2) and write(2) can transfer only part of the data read: if there is not enough data write: if the buffer is small but not full With fcntl(2) you can set O_NONBLOCK read(2) will return EAGAIN instead of blocking flags = fcntl(fd, F_GETFL); fcntl(fd, F_SETFL, flags | O_NONBLOCK);