Commit c05517b1 authored by Andrey Vagin's avatar Andrey Vagin Committed by Cyrill Gorcunov

zdtm: fix test "fork"

* handle EINTR
* add more details in an error message
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent dcd64e9d
......@@ -33,9 +33,12 @@ int main(int argc, char **argv)
if (pid == 0)
exit(0);
wpid = wait(&status);
while ((wpid = wait(&status)) == -1 && errno == EINTR);
if (wpid != pid) {
fail("Pids do not match");
fail("Pids do not match: expected %d "
"instead of %d (errno=%d status=%x)",
pid, wpid, errno, status);
goto out;
}
......
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