[42580] in Cypherpunks

home help back first fref pref prev next nref lref last post

Re: /dev/random for FreeBSD [was: Re: /dev/random for Linux]

daemon@ATHENA.MIT.EDU (Mike_Spreitzer.PARC@xerox.com)
Tue Oct 31 13:14:29 1995

Date: Tue, 31 Oct 1995 09:44:53 PST
From: Mike_Spreitzer.PARC@xerox.com
In-Reply-To: "<9510310316.AA26268@dcl.MIT.EDU>"
To: tytso@MIT.EDU
Cc: stripes@va.pubnix.com, mark@grondar.za, cypherpunks@toad.com

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}

home help back first fref pref prev next nref lref last post