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

zdtm: close a write end of a status pipe in a parent process

Otherwise a parent hangs if a child died, because
it reads from a status pipe.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 44c2ac93
......@@ -122,6 +122,8 @@ int main(int argc, char *argv[])
fprintf(stderr, "clone() failed: %m\n");
exit(1);
}
close(status_pipe[1]);
status = 1;
ret = read(status_pipe[0], &status, sizeof(status));
if (ret != sizeof(status) || status)
......
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