apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: 2.0.36 hangs on linux on startup
Date Wed, 22 May 2002 23:21:18 GMT
On Thu, 23 May 2002, Jie Gao wrote:

> The httpd won't fork and hangs on reading from /dev/random: It never
> returns. Would it be possible to have a runtime conf directive to use
> /dev/urandom instead?

This is probably because of mod_auth_digest, which uses
apr_generate_random_bytes().

My question is this: why does APR's configure.in prefer /dev/random over
/dev/urandom?  I think it should be the other way around:

Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.449
diff -u -d -r1.449 configure.in
--- configure.in        14 May 2002 07:38:16 -0000      1.449
+++ configure.in        22 May 2002 23:21:01 -0000
@@ -1527,13 +1527,13 @@
 dnl #----------------------------- Checking for /dev/random
 AC_MSG_CHECKING(for /dev/random)

-if test -r "/dev/random"; then
-    AC_DEFINE(DEV_RANDOM, [/dev/random])
-    AC_MSG_RESULT(/dev/random)
-    rand="1"
-elif test -r "/dev/urandom"; then
+if test -r "/dev/urandom"; then
     AC_DEFINE(DEV_RANDOM, [/dev/urandom])
     AC_MSG_RESULT(/dev/urandom)
+    rand="1"
+elif test -r "/dev/random"; then
+    AC_DEFINE(DEV_RANDOM, [/dev/random])
+    AC_MSG_RESULT(/dev/random)
     rand="1"
 else
     case $host in


--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message