From 7377aacd84d680123571b50fb8a8decabdc22420 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 22 Feb 2011 00:01:48 +0100 Subject: [PATCH] seed the random number generator at startup --- src/redis.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/redis.c b/src/redis.c index e8a54be7..613f5036 100644 --- a/src/redis.c +++ b/src/redis.c @@ -916,6 +916,7 @@ void initServer() { } if (server.vm_enabled) vmInit(); + srand(time(NULL)^getpid()); } /* Populates the Redis Command Table starting from the hard coded list