[CRIU] [PATCH] pipe00: when while a child is preparing file descriptors
Andrey Vagin
avagin at openvz.org
Tue Dec 22 04:34:22 PST 2015
From: Andrew Vagin <avagin at virtuozzo.com>
Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
test/zdtm/live/static/pipe00.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/test/zdtm/live/static/pipe00.c b/test/zdtm/live/static/pipe00.c
index 0446c42..dd487d0 100644
--- a/test/zdtm/live/static/pipe00.c
+++ b/test/zdtm/live/static/pipe00.c
@@ -18,9 +18,12 @@ int main(int argc, char ** argv)
int ret;
pid_t pid;
char buf[sizeof(TEST_STRING)];
+ task_waiter_t t;
test_init(argc, argv);
+ task_waiter_init(&t);
+
ret = pipe(pipe1);
if (ret)
return 1;
@@ -53,6 +56,8 @@ int main(int argc, char ** argv)
if (pid > 0) {
int status;
+ task_waiter_wait4(&t, 1);
+
test_daemon();
test_waitsig();
@@ -86,6 +91,7 @@ int main(int argc, char ** argv)
pass();
} else {
+ task_waiter_complete(&t, 1);
ret = write(11, TEST_STRING, sizeof(TEST_STRING));
if (ret != sizeof(TEST_STRING)) {
pr_perror("write failed: %d", ret);
--
2.4.3
More information about the CRIU
mailing list