mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 06:45:35 +00:00
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: Andrey Vagin <avagin@virtuozzo.com> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
e2a892b18c
commit
d38e8fe965
@@ -175,8 +175,8 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
test_waitsig();
|
test_waitsig();
|
||||||
|
|
||||||
killall();
|
|
||||||
for (i = 0; i < scale; i++) {
|
for (i = 0; i < scale; i++) {
|
||||||
|
kill(pids[i], SIGUSR2);
|
||||||
if (waitpid(pids[i], &rv, 0) < 0) {
|
if (waitpid(pids[i], &rv, 0) < 0) {
|
||||||
fail("waitpid error: %m\n");
|
fail("waitpid error: %m\n");
|
||||||
counter++;
|
counter++;
|
||||||
|
Reference in New Issue
Block a user