Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 545258b

Browse files
committed
send out ack if pod already finished
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
1 parent 9611ecf commit 545258b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/init.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,10 @@ static void hyper_cleanup_shared(struct hyper_pod *pod)
10041004

10051005
void hyper_cleanup_pod(struct hyper_pod *pod)
10061006
{
1007+
if (pod->init_pid) {
1008+
hyper_kill_process(pod->init_pid);
1009+
pod->init_pid = 0;
1010+
}
10071011
hyper_cleanup_containers(pod);
10081012
hyper_cleanup_network(pod);
10091013
hyper_cleanup_shared(pod);
@@ -1016,6 +1020,7 @@ static int hyper_stop_pod(struct hyper_pod *pod)
10161020
fprintf(stdout, "hyper_stop_pod init_pid %d\n", pod->init_pid);
10171021
if (pod->init_pid == 0) {
10181022
fprintf(stdout, "container init pid is already exit\n");
1023+
hyper_send_type(ctl.chan.fd, ACK);
10191024
return 0;
10201025
}
10211026

0 commit comments

Comments
 (0)