mirror of
https://github.com/redis/redis.git
synced 2026-04-21 03:01:35 -04:00
Set the initial seed for random() (#5679)
This commit is contained in:
@@ -5135,6 +5135,7 @@ int main(int argc, char **argv) {
|
||||
tzset(); /* Populates 'timezone' global. */
|
||||
zmalloc_set_oom_handler(redisOutOfMemoryHandler);
|
||||
srand(time(NULL)^getpid());
|
||||
srandom(time(NULL)^getpid());
|
||||
gettimeofday(&tv,NULL);
|
||||
crc64_init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user