This is kind of cool.  If the mod_rivet master interpreter has gotten its 
random seed initialized, say by some Tcl code requesting a random number, then 
when Apache forks off children they will inherit the same random seed and hence 
produce the same sequence.

This can be fixed from the Rivet config by forcing children to re-seed the RNG, 
something like:

RivetServerConf ChildInitScript "expr {srand([clock clicks] + [pid])}”

It might be a good idea to do this in C in Rivet whenever running 
SeparateVirtualInterps off.


Reply via email to