mirror of
https://github.com/fluencelabs/redis
synced 2025-04-01 15:21:03 +00:00
Sentinel: Reject config from STDIN
Sentinel needs to die with a more accurate error message when attempted to open a config from STDIN. See: https://groups.google.com/forum/#!topic/redis-db/sYx7VNMWaNM
This commit is contained in:
parent
60c448b584
commit
681de88df4
@ -3576,6 +3576,13 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
if (server.sentinel_mode && configfile && *configfile == '-') {
|
||||||
|
redisLog(REDIS_WARNING,
|
||||||
|
"Sentinel config from STDIN not allowed.");
|
||||||
|
redisLog(REDIS_WARNING,
|
||||||
|
"Sentinel needs config file on disk to save state. Exiting...");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
if (configfile) server.configfile = getAbsolutePath(configfile);
|
if (configfile) server.configfile = getAbsolutePath(configfile);
|
||||||
resetServerSaveParams();
|
resetServerSaveParams();
|
||||||
loadServerConfig(configfile,options);
|
loadServerConfig(configfile,options);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user