kill all exec rather than only container in hyper_term_all()

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
This commit is contained in:
Lai Jiangshan
2016-04-06 15:03:52 +08:00
parent aa50e5812b
commit 1cff207e67
+3 -3
View File
@@ -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)