apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: /dev/urandom vs /dev/random [was Re: 2.0.36 hangs on linux on startup]
Date Sun, 26 May 2002 17:25:27 GMT
Cliff Woolley wrote:
> On Sun, 26 May 2002, Ben Laurie wrote:
>>>>3) open /dev/random in non-blocking mode and defer EAGAIN reads
>>>>  until later (read it at startup; if it would block, try again when
>>>>  the entropy is actually needed, failing if it isn't ready by then
>>>>    -- no idea if this would even work).
>>Grr. We keep going around this loop - there isn't a "one size fits all"
>>answer to the problem.
> Okay, fair enough.  Patch withdrawn.  What do you think of option #3?
> Perhaps not fail, but defer the blocking read?

BTW, it only blocks under Linux, FreeBSD just returns short, so you need 
to be careful you haven't assumed blocking (and that you handle short 
reads correctly).



http://www.apache-ssl.org/ben.html       http://www.thebunker.net/

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

View raw message