17 Dec
2003
17 Dec
'03
11:17 p.m.
Blocking vs. non-blocking is a standard issue in design of U*X devices. Standard solution: make it block by default, and accept an IOCTL to put it in non-blocking mode. There's even a POSIX way to do this: flags_or_err = fcntl(fd, F_GETFL, 0); {check for error} res = fcntl(fd, F_SETFL, flags_or_err | O_NONBLOCK); {check for error}