/dev/random for FreeBSD [was: Re: /dev/random for Linux]
Mike_Spreitzer.PARC at xerox.com
Mike_Spreitzer.PARC at xerox.com
Tue Oct 31 10:56:13 PST 1995
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}
More information about the Testlist
mailing list