diff options
author | antirez <antirez@gmail.com> | 2016-09-19 14:11:17 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2016-09-19 14:11:17 +0200 |
commit | e9d861ec69a11208578fc2a8b7dcdf4c52df316e (patch) | |
tree | 576de8a0a678d82a774bb9753982393d094b1b63 /src/childinfo.c | |
parent | e565632e599bd1801abca2359453feac51312b28 (diff) | |
download | redis-e9d861ec69a11208578fc2a8b7dcdf4c52df316e.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.
Diffstat (limited to 'src/childinfo.c')
-rw-r--r-- | src/childinfo.c | 2 |
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)); } } |