Permalink
Browse files

redis-benchmark: seed the PRNG with time() at startup.

  • Loading branch information...
1 parent 395d663 commit b4abbaf755d723d33b0e81880fb035ab88f3544f @antirez committed Nov 30, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/redis-benchmark.c
View
@@ -35,6 +35,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
+#include <time.h>
#include <sys/time.h>
#include <signal.h>
#include <assert.h>
@@ -510,6 +511,7 @@ int main(int argc, const char **argv) {
client c;
+ srandom(time(NULL));
signal(SIGHUP, SIG_IGN);
signal(SIGPIPE, SIG_IGN);

0 comments on commit b4abbaf

Please sign in to comment.