Commit 2572bb13 authored by antirez's avatar antirez
Browse files

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

parent e34c14df
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <time.h>
#include <sys/time.h> #include <sys/time.h>
#include <signal.h> #include <signal.h>
#include <assert.h> #include <assert.h>
...@@ -510,6 +511,7 @@ int main(int argc, const char **argv) { ...@@ -510,6 +511,7 @@ int main(int argc, const char **argv) {
client c; client c;
srandom(time(NULL));
signal(SIGHUP, SIG_IGN); signal(SIGHUP, SIG_IGN);
signal(SIGPIPE, SIG_IGN); signal(SIGPIPE, SIG_IGN);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment