source reshaped a bit to play well with a bgsaving thread, still work to do, does not compile.

This commit is contained in:
antirez
2011-01-07 18:15:14 +01:00
parent cb9b35c8ca
commit 36c17a53b6
8 changed files with 103 additions and 54 deletions

View File

@ -585,10 +585,7 @@ void aofRemoveTempFile(pid_t childpid) {
/* 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];
@ -636,7 +633,7 @@ void backgroundRewriteDoneHandler(int statloc) {
} else {
redisLog(REDIS_WARNING,
"Background append only file rewriting terminated by signal %d",
WTERMSIG(statloc));
bysitnal);
}
cleanup:
sdsfree(server.bgrewritebuf);