send eof of stdout back to runv ony when release_exec()

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
This commit is contained in:
Lai Jiangshan
2016-03-19 10:27:42 +08:00
parent 36fb6e6877
commit 5279ef3f96
+2 -2
View File
@@ -75,8 +75,6 @@ static void pts_hup(struct hyper_event *de, int efd, struct hyper_exec *exec)
hyper_event_hup(de, efd);
hyper_send_exec_eof(exec, 0);
hyper_release_exec(exec, pod);
}
@@ -654,6 +652,8 @@ int hyper_release_exec(struct hyper_exec *exec,
list_del_init(&exec->list);
hyper_send_exec_eof(exec, 0);
hyper_send_exec_code(exec, 0);
fprintf(stdout, "%s exit code %" PRIu8"\n", __func__, exec->code);