[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

Perry E. Metzger wrote:
> Tom Weinstein writes:
> > One problem with this scheme is that if multiple processes have
> > /dev/random open you can block unexpectedly.  If I try to avoid
> > blocking by first checking if entropy is available there's a race
> > condition if another process reads from the device.  Is there
> > another way to avoid blocking?
> Yeah. Use non-blocking I/O. Its in every version of Unix I've touched
> for over a decade.

I guess I wasn't clear.  The message I was replying to defined how
the driver decided whether to block.  Since I don't have the source
code, I was wondering whether non-blocking I/O worked for this driver.

Sure we spend a lot of money, but that doesn't mean | Tom Weinstein
we *do* anything.  --  Washington DC motto          | [email protected]