Set the initial seed for random() (#5679)
This commit is contained in:
parent
70c823a64e
commit
8736ac973a
@ -5135,6 +5135,7 @@ int main(int argc, char **argv) {
|
|||||||
tzset(); /* Populates 'timezone' global. */
|
tzset(); /* Populates 'timezone' global. */
|
||||||
zmalloc_set_oom_handler(redisOutOfMemoryHandler);
|
zmalloc_set_oom_handler(redisOutOfMemoryHandler);
|
||||||
srand(time(NULL)^getpid());
|
srand(time(NULL)^getpid());
|
||||||
|
srandom(time(NULL)^getpid());
|
||||||
gettimeofday(&tv,NULL);
|
gettimeofday(&tv,NULL);
|
||||||
crc64_init();
|
crc64_init();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user