From 3d57690daaaf6b923163a9936c8c459162c3323c Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Sun, 5 Jun 2016 22:27:14 +0800 Subject: [PATCH] send READY a little earlier when creating container the flush(stdout) is removed, because it is also called in the following code hyper_dup_exec_tty(). Signed-off-by: Lai Jiangshan --- src/container.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/container.c b/src/container.c index 5a62fd4..ec979d9 100644 --- a/src/container.c +++ b/src/container.c @@ -600,6 +600,8 @@ static int hyper_container_init(void *data) goto fail; } + hyper_send_type(arg->pipe[1], READY); + if (container->exec.workdir && chdir(container->exec.workdir) < 0) { perror("change work directory failed"); return -1; @@ -616,9 +618,6 @@ static int hyper_container_init(void *data) goto fail; } - hyper_send_type(arg->pipe[1], READY); - fflush(stdout); - if (container_setup_tty(container) < 0) { fprintf(stdout, "setup tty failed\n"); goto fail;