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

pipe00: when while a child is preparing file descriptors

Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent d35efb4a
......@@ -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);
......
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