summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2016-09-19 14:11:17 +0200
committerantirez <antirez@gmail.com>2016-09-19 14:11:17 +0200
commite9d861ec69a11208578fc2a8b7dcdf4c52df316e (patch)
tree576de8a0a678d82a774bb9753982393d094b1b63
parente565632e599bd1801abca2359453feac51312b28 (diff)
downloadredis-cow-pipe.tar.gz
Clear child data when opening the pipes.cow-pipe
This is important both to reset the magic to 0, so that it will not match if the structure is not explicitly set, and to initialize other things we may add like counters and such.
-rw-r--r--src/childinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/childinfo.c b/src/childinfo.c
index 123c20421..719025e8c 100644
--- a/src/childinfo.c
+++ b/src/childinfo.c
@@ -40,6 +40,8 @@ void openChildInfoPipe(void) {
closeChildInfoPipe();
} else if (anetNonBlock(NULL,server.child_info_pipe[0]) != ANET_OK) {
closeChildInfoPipe();
+ } else {
+ memset(&server.child_info_data,0,sizeof(server.child_info_data));
}
}