Commit c0970b59 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

zdtm/maps007: send SIGTERM to stop a child process

It's typo fix. SIGTERM generates code dump and it's a reason
why this test fails by timeout sometimes.
Signed-off-by: 's avatarAndrew Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 5e1a8a25
...@@ -131,8 +131,9 @@ int main(int argc, char **argv) ...@@ -131,8 +131,9 @@ int main(int argc, char **argv)
err("unexpected state"); err("unexpected state");
futex_set_and_wake(&shm->stop, 2); futex_set_and_wake(&shm->stop, 2);
test_waitsig(); test_waitsig();
return 0;
} else { } else {
int readable = 0; int readable = 0, status = -1;
/* stop the child */ /* stop the child */
futex_set(&shm->stop, 1); futex_set(&shm->stop, 1);
...@@ -160,8 +161,12 @@ int main(int argc, char **argv) ...@@ -160,8 +161,12 @@ int main(int argc, char **argv)
} }
} }
test_msg("readable %d\n", readable); test_msg("readable %d\n", readable);
kill(child, SIGTRAP); kill(child, SIGTERM);
wait(NULL); wait(&status);
if (status != 0) {
err("Non-zero exit code: %d", status);
goto err;
}
pass(); pass();
} }
......
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