Commit b2473542 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Andrei Vagin

zdtm: Fix race in zdtm/transition/epoll.c test

Child may see close() result before it receives signal,
while it shouldn't see it. Instead of games with later
close(), just stop do it. sys_exit() after program finish
will close them all.
Reported-by: 's avatarAndrey Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 900025db
......@@ -175,8 +175,8 @@ int main(int argc, char **argv)
test_waitsig();
killall();
for (i = 0; i < scale; i++) {
kill(pids[i], SIGUSR2);
if (waitpid(pids[i], &rv, 0) < 0) {
fail("waitpid error: %m\n");
counter++;
......
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