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 <jiangshanlai@gmail.com>
This commit is contained in:
Lai Jiangshan
2016-06-05 23:21:24 +08:00
parent 9ca23869fc
commit 3d57690daa
+2 -3
View File
@@ -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;