Unverified Commit e5da28dd by cenxianlong Committed by Stéphane Graber

monitor process exited by signal SIGKILL, clean cgroup resource by third party

Writing the value 0 to a cgroup.procs file causes the writing process to be moved to the corresponding cgroup Signed-off-by: 's avatarcenxianlong <cenxianlong@huawei.com>
parent 7457a8b8
...@@ -1098,10 +1098,12 @@ __cgfsng_ops static void cgfsng_monitor_destroy(struct cgroup_ops *ops, ...@@ -1098,10 +1098,12 @@ __cgfsng_ops static void cgfsng_monitor_destroy(struct cgroup_ops *ops,
goto try_recursive_destroy; goto try_recursive_destroy;
} }
ret = lxc_write_openat(pivot_path, "cgroup.procs", pidstr, len); if (handler->monitor_pid != 0) {
if (ret != 0) { ret = lxc_write_openat(pivot_path, "cgroup.procs", pidstr, len);
SYSWARN("Failed to move monitor %s to \"%s\"", pidstr, pivot_path); if (ret != 0) {
continue; SYSWARN("Failed to move monitor %s to \"%s\"", pidstr, pivot_path);
continue;
}
} }
try_recursive_destroy: try_recursive_destroy:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment