From 153c033d7e3fc7856c3b4abb4d4e6fe41598a8b8 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Thu, 2 Feb 2012 01:26:22 +0400 Subject: [PATCH] zdtm: Add sleep() to zombie00 When creating zombies we must wait for them to appear to test that we do support zombies, but not some transient state. But the thing is that we cannot use wait() or any other synchronous call here, thus we have to suck and use sleep(1) :( Signed-off-by: Pavel Emelyanov Signed-off-by: Cyrill Gorcunov --- test/zdtm/live/static/zombie00.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/zdtm/live/static/zombie00.c b/test/zdtm/live/static/zombie00.c index fb34d4ec2..3ceac93f7 100644 --- a/test/zdtm/live/static/zombie00.c +++ b/test/zdtm/live/static/zombie00.c @@ -60,6 +60,13 @@ int main(int argc, char ** argv) zombie[i].exited, zombie[i].exitcode); } + /* + * We must wait for zombies to appear, but we cannot use + * wait4 here :( Use sleep. + */ + + sleep(1); + test_daemon(); test_waitsig();