You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/09/26 18:13:26 UTC

[GitHub] chewbranca commented on issue #841: Ensure chttpd pids have a proper random seed

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:
users@infra.apache.org


With regards,
Apache Git Services