Doug Hardie erote: > The problem I encountered has now been identified and I have > a working > clamd that does not hang. I compiled it two different ways and both > worked. The problem was /dev/urandom returning either a -1 or a 0. > Either of those will cause others.c to hang as it does not test for > that condition. One approach was to put in a trivial test > for it and > exit from the loop. The other was to remove the define for > C_URANDOM > in the .h file. Both of those approaches worked in my > testing. Since > I couldn't easily determine if the first would have some side > effects > if it didn't return enough random bits, I have gone with the second > approach. My production server has been running for slightly over 6 > hours now and no problems have been seen.
0 is a valid return value from either /dev/urandom or rand(). And if urandom returns -1, shouldn't we just fallback to using rand()? Cheers, Phil --------------------------------------------- Phil Randal Network Engineer Herefordshire Council Hereford, UK ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Clamav-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/clamav-users