Set the initial seed for random() (#5679)

This commit is contained in:
RemRain authored and GitHub committed 2020-08-12 13:15:58 -07:00
1 parent 2530dc0ebd
commit 47637bea6d
1 file changed
+1
+1
View File
@@ -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();