pid_t childpid;
if (server.bgrewritechildpid != -1) return REDIS_ERR;
- redisAssert(server.ds_enabled == 0);
+ if (server.ds_enabled != 0) {
+ redisLog(REDIS_WARNING,"BGREWRITEAOF called with diskstore enabled: AOF is not supported when diskstore is enabled. Operation not performed.");
+ return REDIS_ERR;
+ }
if ((childpid = fork()) == 0) {
/* Child */
char tmpfile[256];
/* A background append only file rewriting (BGREWRITEAOF) terminated its work.
* Handle this. */
-void backgroundRewriteDoneHandler(int statloc) {
- int exitcode = WEXITSTATUS(statloc);
- int bysignal = WIFSIGNALED(statloc);
-
+void backgroundRewriteDoneHandler(int exitcode, int bysignal) {
if (!bysignal && exitcode == 0) {
int fd;
char tmpfile[256];
} else {
redisLog(REDIS_WARNING,
"Background append only file rewriting terminated by signal %d",
- WTERMSIG(statloc));
+ bysignal);
}
cleanup:
sdsfree(server.bgrewritebuf);