Commit b026e59c authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

zdtm: initialize shared memory before fork

Otherwise this memory are initialized from parent and child,
but parent may initialize, when a child has written a useful data.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ba61f946
......@@ -116,15 +116,14 @@ int main(int argc, char ** argv)
ppid = getpid();
pid = test_fork();
MAP_SYNC(map) = 0;
pid = test_fork();
if (pid < 0) {
err("can't fork %m");
exit(1);
}
MAP_SYNC(map) = 0;
if (pid == 0) {
int v = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment