X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/ea66be60802fea82d88d48e0af87d1e6c20bfee5..acfe3675e3c5ab8ee2ca07642334d9468cfc4d39:/src/redis-cli.c diff --git a/src/redis-cli.c b/src/redis-cli.c index ca2f0623..8d20d1cd 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -35,6 +35,7 @@ #include <string.h> #include <stdlib.h> #include <unistd.h> +#include <time.h> #include <ctype.h> #include <errno.h> #include <sys/stat.h> @@ -711,17 +712,17 @@ static void usage() { " -a <password> Password to use when connecting to the server\n" " -r <repeat> Execute specified command N times\n" " -i <interval> When -r is used, waits <interval> seconds per command.\n" -" It is possible to specify sub-second times like -i 0.1.\n" +" It is possible to specify sub-second times like -i 0.1\n" " -n <db> Database number\n" " -x Read last argument from STDIN\n" " -d <delimiter> Multi-bulk delimiter in for raw formatting (default: \\n)\n" " -c Enable cluster mode (follow -ASK and -MOVED redirections)\n" " --raw Use raw formatting for replies (default when STDOUT is not a tty)\n" -" --latency Enter a special mode continuously sampling latency.\n" -" --slave Simulate a slave showing commands received from the master.\n" -" --pipe Transfer raw Redis protocol from stdin to server.\n" -" --bigkeys Sample Redis keys looking for big keys.\n" -" --eval <file> Send an EVAL command using the Lua script at <file>.\n" +" --latency Enter a special mode continuously sampling latency\n" +" --slave Simulate a slave showing commands received from the master\n" +" --pipe Transfer raw Redis protocol from stdin to server\n" +" --bigkeys Sample Redis keys looking for big keys\n" +" --eval <file> Send an EVAL command using the Lua script at <file>\n" " --help Output this help and exit\n" " --version Output version and exit\n" "\n" @@ -1232,7 +1233,7 @@ int main(int argc, char **argv) { /* Pipe mode */ if (config.pipe_mode) { - cliConnect(0); + if (cliConnect(0) == REDIS_ERR) exit(1); pipeMode(); }