httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: random number generation
Date Wed, 04 Feb 2009 22:13:18 GMT


On 02/04/2009 11:06 PM, Matthew Rushton wrote:
> Hi,
>   I'm writing an apache module and need to generate a random number to handle a request.
> The random numbers must be unique across requests and thus across forks. My problem is
> coming up with a way to seed the random numbers in an efficient way. I imagine I'll need
to
> use some combination of a timestamp and process/thread id. Perhaps this is already handled
by
> apache or another module? What have other people done? That's it. Thanks in advance.
> -Matt  

The following might be helpful to you:

http://apr.apache.org/docs/apr/1.3/group__apr__random.html
http://httpd.apache.org/docs/2.2/en/mod/mod_unique_id.html


Regards

RĂ¼diger

Mime
View raw message