mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Merge pull request #2200 from badboy/iss2066-additional
Only ignore sigpipe in interactive mode
This commit is contained in:
commit
b2eb202281
@ -1916,8 +1916,6 @@ int main(int argc, char **argv) {
|
|||||||
argc -= firstarg;
|
argc -= firstarg;
|
||||||
argv += firstarg;
|
argv += firstarg;
|
||||||
|
|
||||||
signal(SIGPIPE, SIG_IGN);
|
|
||||||
|
|
||||||
/* Latency mode */
|
/* Latency mode */
|
||||||
if (config.latency_mode) {
|
if (config.latency_mode) {
|
||||||
if (cliConnect(0) == REDIS_ERR) exit(1);
|
if (cliConnect(0) == REDIS_ERR) exit(1);
|
||||||
@ -1966,6 +1964,9 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
/* Start interactive mode when no command is provided */
|
/* Start interactive mode when no command is provided */
|
||||||
if (argc == 0 && !config.eval) {
|
if (argc == 0 && !config.eval) {
|
||||||
|
/* Ignore SIGPIPE in interactive mode to force a reconnect */
|
||||||
|
signal(SIGPIPE, SIG_IGN);
|
||||||
|
|
||||||
/* Note that in repl mode we don't abort on connection error.
|
/* Note that in repl mode we don't abort on connection error.
|
||||||
* A new attempt will be performed for every command send. */
|
* A new attempt will be performed for every command send. */
|
||||||
cliConnect(0);
|
cliConnect(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user