mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-09-05 13:11:37 +00:00
kill all exec rather than only container in hyper_term_all()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
This commit is contained in:
+3
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user