send out ack if pod already finished

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
This commit is contained in:
Gao feng
2015-11-23 19:09:51 +08:00
parent 9611ecf356
commit 545258bd26
+5
View File
@@ -1004,6 +1004,10 @@ static void hyper_cleanup_shared(struct hyper_pod *pod)
void hyper_cleanup_pod(struct hyper_pod *pod)
{
if (pod->init_pid) {
hyper_kill_process(pod->init_pid);
pod->init_pid = 0;
}
hyper_cleanup_containers(pod);
hyper_cleanup_network(pod);
hyper_cleanup_shared(pod);
@@ -1016,6 +1020,7 @@ static int hyper_stop_pod(struct hyper_pod *pod)
fprintf(stdout, "hyper_stop_pod init_pid %d\n", pod->init_pid);
if (pod->init_pid == 0) {
fprintf(stdout, "container init pid is already exit\n");
hyper_send_type(ctl.chan.fd, ACK);
return 0;
}