Unable to generate random numbers?
Lowell Gilbert
freebsd-stable-local at be-well.ilk.org
Thu Sep 21 06:43:28 PDT 2006
Krassimir Slavchev <krassi at bulinfo.net> writes:
> When I try to generate random bytes using rand() or random()
> functions I found that these functions
> return constant values!?
Show your code (preferably a minimal, compilable, example);
chances are that you are not initializing the state properly
for use of those functions. Note that those functions are not
in any way related to the kernel random(4) device.
I suspect this question would be more appropriate on
FreeBSD-Questions; the version of FreeBSD you're running
isn't really relevant.
More information about the freebsd-stable
mailing list