apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Collins-Sussman <suss...@collab.net>
Subject Re: apr_generate_random_bytes() blocks forever
Date Tue, 11 Mar 2003 23:36:34 GMT
Joe Orton <joe@manyfish.co.uk> writes:

> > Sander says there was a long thread about this, about how people
> > wanted "strong random", but now we're stuck with a situation where
> > apr_uuid_get() can block indefinitely...   :-(
> 
> Workarounds are:
> 
> 1. configure --with-devrandom=/dev/urandom
> 2. (while sleep 120; do ls -laR / > /dev/random; done) &
> 
> A solution is probably to add an apr_generate_quite_random_bytes() or
> something which prefers /dev/urandom over /dev/random, and/or times out
> reads from /dev/random and falls back on urandom, etc etc.

Or gstein has suggested that apr_generate_random_bytes() can grow a
new flag, indicating urandom is preferred.

Mime
View raw message