]> git.saurik.com Git - redis.git/blobdiff - src/redis.c
More robust handling of AOF rewrite child.
[redis.git] / src / redis.c
index fc8f07888439c105639266c3adbd8e12d810f382..e4b3679885b44333ad83e3820510ef4ccf8d0607 100644 (file)
@@ -915,8 +915,12 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
 
             if (pid == server.rdb_child_pid) {
                 backgroundSaveDoneHandler(exitcode,bysignal);
-            } else {
+            } else if (pid == server.aof_child_pid) {
                 backgroundRewriteDoneHandler(exitcode,bysignal);
+            } else {
+                redisLog(REDIS_WARNING,
+                    "Warning, detected child with unmatched pid: %ld",
+                    (long)pid);
             }
             updateDictResizePolicy();
         }