From 1cff207e6731ed90c5f6ee5ad26b569baf60a309 Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Wed, 6 Apr 2016 15:03:52 +0800 Subject: [PATCH] kill all exec rather than only container in hyper_term_all() Signed-off-by: Lai Jiangshan --- src/init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/init.c b/src/init.c index 6f037e8..4b8a0f3 100644 --- a/src/init.c +++ b/src/init.c @@ -143,7 +143,7 @@ static void hyper_term_all(struct hyper_pod *pod) DIR *dp; struct dirent *de; pid_t *pids = NULL; - struct hyper_container *c; + struct hyper_exec *e; dp = opendir("/proc"); if (dp == NULL) @@ -175,8 +175,8 @@ static void hyper_term_all(struct hyper_pod *pod) free(pids); closedir(dp); - list_for_each_entry(c, &pod->containers, list) - hyper_kill_process(c->exec.pid); + list_for_each_entry(e, &pod->exec_head, list) + hyper_kill_process(e->pid); } static int hyper_handle_exit(struct hyper_pod *pod)