]> git.saurik.com Git - redis.git/commit - src/redis.c
More robust handling of AOF rewrite child.
authorantirez <antirez@gmail.com>
Thu, 1 Nov 2012 21:39:39 +0000 (22:39 +0100)
committerantirez <antirez@gmail.com>
Thu, 1 Nov 2012 21:39:39 +0000 (22:39 +0100)
commit05d8e2c938e3b06efe3573deb97adb767550becc
tree030d0e668a677993d3090d9d483307a88eaa2f12
parentf0266532fc82b8ae9a87407adaf4555dddce690e
More robust handling of AOF rewrite child.

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.
src/redis.c