Launch the pro binary with --enable-pro

Former-commit-id: ab365ce3da864bbcd0d8a9c77ba55dad365ffdff
This commit is contained in:
John Sully 2019-12-17 23:52:19 -05:00
parent 3c25d332a3
commit ce6a682173
3 changed files with 9 additions and 0 deletions

View File

@ -802,6 +802,8 @@ void loadServerConfigFromString(char *config) {
g_fTestMode = yesnotoi(argv[1]);
} else if (!strcasecmp(argv[0],"rdbfuzz-mode")) {
// NOP, handled in main
} else if (!strcasecmp(argv[0],"enable-pro")) {
cserver.fUsePro = true;
} else {
err = "Bad directive or wrong number of arguments"; goto loaderr;
}

View File

@ -5183,6 +5183,12 @@ int main(int argc, char **argv) {
sdsfree(options);
}
if (cserver.fUsePro) {
execv("keydb-pro-server", argv);
perror("Failed launch the pro binary");
exit(EXIT_FAILURE);
}
serverLog(LL_WARNING, "oO0OoO0OoO0Oo KeyDB is starting oO0OoO0OoO0Oo");
serverLog(LL_WARNING,
"KeyDB version=%s, bits=%d, commit=%s, modified=%d, pid=%d, just started",

View File

@ -1599,6 +1599,7 @@ struct redisServerConst {
size_t system_memory_size; /* Total memory in system as reported by OS */
unsigned char uuid[UUID_BINARY_LEN]; /* This server's UUID - populated on boot */
bool fUsePro = false;
};
struct redisServer {