chewbranca commented on issue #841: Ensure chttpd pids have a proper random seed
URL: https://github.com/apache/couchdb/pull/841#issuecomment-332287275
 
 
   Yeah I'm thinking we would be better served by a function like:
   
   ```erlang
   maybe_seed() ->
       case get(random_seed) of
           undefined ->
               <<A:32, B:32, C:32>> = crypto:rand_bytes(12),
               Seed = {A, B, C},
               random:seed(Seed),
               Seed;
           Seed ->
               Seed
   end.
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to