summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-02-22 00:01:48 +0100
committerantirez <antirez@gmail.com>2011-02-22 00:01:48 +0100
commit7377aacd84d680123571b50fb8a8decabdc22420 (patch)
tree91d0e749d4d4b2d458dc9d9769b7c39ec6d8c01e
parenteece2d528cf8feb6534a19311220c5c4f390df54 (diff)
downloadredis-7377aacd84d680123571b50fb8a8decabdc22420.tar.gz
seed the random number generator at startup
-rw-r--r--src/redis.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/redis.c b/src/redis.c
index e8a54be7e..613f5036d 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