• antirez's avatar
    More robust handling of AOF rewrite child. · 36f026a3
    antirez authored
    After the wait3() syscall we used to do something like that:
    
        if (pid == server.rdb_child_pid) {
            backgroundSaveDoneHandler(exitcode,bysignal);
        } else {
            ....
        }
    
    So the AOF rewrite was handled in the else branch without actually
    checking if the pid really matches. This commit makes the check explicit
    and logs at WARNING level if the pid returned by wait3() does not match
    neither the RDB or AOF rewrite child.
    36f026a3
redis.c 98.3 KB